Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-02-2004, 02:06 PM
nurulmajdi's Avatar
Inspired Webmaster
 
Join Date: Feb 2004
Location: Klang Bandar Diraja
Posts: 160
Rep Power: 62
nurulmajdi is on a distinguished road
Send a message via Yahoo to nurulmajdi
script

ini file : admin.approve.member.php

<?php
include ('Connections/star.php');// file yg ada conn to dbase nyer script.


$sql_check = mysql_query ("SELECT * FROM user_mgt_temp");
$num_rows = mysql_num_rows ($sql_check);

if ($num_rows == 0)
{
echo 'Tiada permohonan yang perlu disahkan';
}
else
{
while($row = mysql_fetch_array($sql_check))
{
$user_id = $rows["user_id"];
$user_name = $row["user_name"];
$user_pword = $row["user_pword"];
$user_hint_pword = $row["user_hint_pword"];
$user_fullname = $row["user_fullname"];
$user_email = $row["user_email"];
$user_startdate = $row["user_startdate"];
$user_finishdate = $row["user_finishdate"];
$user_status = $row["user_status"];
}
}
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<p align="center">Borang Pengesahan Ahli allSTARian.net</p>
<table width="350" border="0" align="center" cellpadding="0" cellspacing="1">
<form name="approveform" action="../approvedmembership.parse.php" method="post">
<tr>
<td width="192">Nama Pengguna</td>
<td width="182"><?php echo $user_name; ?>&nbsp;</td>
</tr>
<tr>
<td>Katalaluan</td>
<td><?php echo $user_pword; ?>&nbsp;</td>
</tr>
<tr>
<td>Katakunci bagi Katalaluan</td>
<td><?php echo $user_hint_pword; ?>&nbsp;</td>
</tr>
<tr>
<td>Nama Penuh</td>
<td><?php $user_fullname; ?>&nbsp;</td>
</tr>
<tr>
<td>Emel Pengguna</td>
<td><?php echo $user_email; ?>&nbsp;</td>
</tr>
<tr>
<td>Tahun Masuk</td>
<td><?php echo $user_startdate; ?>&nbsp;</td>
</tr>
<tr>
<td>Tahun Keluar</td>
<td><?php echo $user_finishdate; ?>&nbsp;</td>
</tr>
<tr>
<td>Status STAR</td>
<td><?php echo $user_status; ?>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name="mohon" type="submit" id="mohon" value="Sah"></td>
</tr>
</form>
</table>
</body>
</html>

ini plak file approvedmembership.parse.php
<?php

require_once('Connections/star.php');



$user_name = $_POST['user_name'];
$user_pword = $_POST['user_pword'];
$user_hint_pword = $_POST['user_hint_pword'];
$user_email = $_POST['user_email'];
$user_fullname = $_POST['user_fullname'];
$user_startdate = $_POST['user_startdate'];
$user_finishdate = $_POST['user_finishdate'];
$user_status = $_POST['user_status'];

/* Strip any slashes in case user entered any esacped char */
$user_name = stripslashes($user_name);
$user_pword = stripslashes($user_pword);
$user_hint_pword = stripslashes($user_hint_pword);
$user_email = stripslashes($user_email);
$user_fullname = stripslashes($user_fullname);
$user_startdate = stripslashes($user_startdate);
$user_finishdate = stripslashes($user_finishdate);
$user_status = stripslashes($user_status);

//Check in the dbase whether username exist , if does user must enter other username

$insert_value = mysql_query("INSERT INTO user_mgt
(user_id,
user_name,
user_pword,
user_hint_pword,
user_email,
user_fullname,
user_startdate,
user_finishdate,
user_status)
VALUES
('',
'$user_name',
'$user_pword',
'$user_hint_pword',
'$user_email',
'$user_fullname',
'$user_startdate',
'$user_finishdate',
'$user_status')")
or die (mysql_error());
if(!$insert_value)
{
echo 'Cannot insert to dbase';
}
else
{
echo 'Value Added into user_mgt!';

$userid = mysql_insert_id();

$subject = "Your Membership at allSTARian.net";
$message = "Dear $fullname,
Thank you for registering at allSTARian.net, http://www.allstarian.net!
You are two steps away from logging in and accessing our exclusive
members area.

To activate your membership,
Please click here :
http://www.allstarian.net /activate.php?id=$userid&code=$user_pword

Once you activate your membership, you will be able to login with the
following information,

Username : $user_name
Password : $user_pword

Thanks!
The Webmaster

This is automated response, please do not reply!";

mail($user_email,$subject,$message);


}

$del_user_temp = mysql_query("DELETE FROM user_mgt_temp WHERE user_id = $userid");

?>

error yg kuar plak :
Fatal error: Failed opening required 'Connections/star.php' (include_path='.;C:/phpdev/php/includes;C:/phpdev/php/class') in c:\phpdev\www\star\admin\admin.approve.member.php on line 2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-02-2004, 05:01 PM
lcf's Avatar
lcf lcf is offline
Pro-Blogger
 
Join Date: Feb 2003
Location: Kluang, Johor
Posts: 2,376
Rep Power: 118
lcf will become famous soon enough
Send a message via ICQ to lcf Send a message via MSN to lcf Send a message via Yahoo to lcf
File not found or Path error at Line:
include ('Connections/star.php');

check again the path, and it is case sensitive.
__________________
LiewCF | Malaysia Bloggers Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-02-2004, 01:17 AM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 769
Rep Power: 101
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
where is ur "Connections/star.php"; ?

it'z on

1) c:\phpdev\www\star\admin\Connections\star.php

or

2) c:\phpdev\www\star\Connections\star.php

if #1 just pust the '..' at ur from include eg ("../Connections/star.php");
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 12-02-2004, 02:17 AM
mysticmind's Avatar
Super Moderator
 
Join Date: Jun 2001
Location: Mystic Kingdoms
Posts: 2,687
Rep Power: 145
mysticmind will become famous soon enough mysticmind will become famous soon enough
Send a message via Yahoo to mysticmind
betul ke nama file connection tuh star.php? bintang.php?
aku rasa.. ada kebarangkalian benarnya lebih kepada "START.php".

agaknya camtuh laa logiknya

PHP Code:
<?php 
include ('Connections/start.php');// start.php or star.php?
?>
-------------- error message -----

Fatal error: Failed opening required 'Connections/star.php' (include_path='.;C:/phpdev/php/includes;C:/phpdev/php/class') in c:\phpdev\www\star\admin\admin.approve.member.php on line 2

----------------------------------------

fail star.php gagal dibuka. dir tak kena.

selain tuh penggunaan slash dan dot syntax =
example :
../../file.php
../file.php here..

aku pun selalu jadi camnih.. tambah plak kalau file tuh berada difolder yang berlainan antara satu sama lain.. jadi ada baiknya setkan var utk $rootdir contohnya.. then masukkan full url.

tah ler.. lama dah tak menghadap php.. tanya MHR.. tiap2 hari dia makan php. :P
__________________
Personal's Blog! - Malaysian Artist!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-02-2004, 04:22 PM
lcf's Avatar
lcf lcf is offline
Pro-Blogger
 
Join Date: Feb 2003
Location: Kluang, Johor
Posts: 2,376
Rep Power: 118
lcf will become famous soon enough
Send a message via ICQ to lcf Send a message via MSN to lcf Send a message via Yahoo to lcf
I think should be:
include ('../Connections/start.php');

A database connection file use 'STAR' as filename is rather weird. :P

btw, additional to hymns' reply:
if, the file is at c:\phpdev\www\star\Connections\star.php
Then use,
include ('../../Connections/star.php');
__________________
LiewCF | Malaysia Bloggers Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 13-02-2004, 03:48 PM
ardiles's Avatar
Senior Webmaster
 
Join Date: Mar 2003
Location: Kamunting, Perak
Posts: 640
Rep Power: 83
ardiles is on a distinguished road
Send a message via MSN to ardiles Send a message via Yahoo to ardiles
*** offtopic

ni STAR = Sekolah Tuanku Abdul Rahman Ipoh punya ke? ke STAR lain?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 13-02-2004, 11:03 PM
Senior Webmaster
 
Join Date: Jun 2003
Location: malaysia
Posts: 315
Rep Power: 73
Syazwan is on a distinguished road
huk aloh ko nie...
...aku takleh tulung ler...koz aku b'ngap bab php...ihik2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 14-02-2004, 12:06 AM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 769
Rep Power: 101
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
hehehe pulak dah...
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 16-02-2004, 10:19 AM
nurulmajdi's Avatar
Inspired Webmaster
 
Join Date: Feb 2004
Location: Klang Bandar Diraja
Posts: 160
Rep Power: 62
nurulmajdi is on a distinguished road
Send a message via Yahoo to nurulmajdi
btul la tu...
STAR = Sekolah Tuanku Abdul Rahman, Ipoh

aku tgh wat portal tuk skola tu.. praktikal nyer projek... apsal ko dak skola tu ke?
__________________
To follow the path:
Look to the master,
Follow the master,
Walk with the master,
See through the master,
Become the master.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 16-02-2004, 10:23 AM
nurulmajdi's Avatar
Inspired Webmaster
 
Join Date: Feb 2004
Location: Klang Bandar Diraja
Posts: 160
Rep Power: 62
nurulmajdi is on a distinguished road
Send a message via Yahoo to nurulmajdi
pasal probaku tu.. aku dah discover dah.. aku nyer mysql corrupt. thanks to moderator bazet.geo sbb tulong aku... neway, thanks gak sbb korg berusaha nak bgth aku apa solution to my prob tu.. syukran!
__________________
To follow the path:
Look to the master,
Follow the master,
Walk with the master,
See through the master,
Become the master.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 16-02-2004, 03:46 PM
MHR's Avatar
MHR MHR is offline
Senior Webmaster
 
Join Date: Sep 2001
Location: epox
Posts: 435
Rep Power: 96
MHR is on a distinguished road
Send a message via ICQ to MHR Send a message via Yahoo to MHR
eh, bazet idup lagi?
__________________
Munzir + "/^[Hh](a)(z)\1\2[iI]$/"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 16-02-2004, 04:02 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 769
Rep Power: 101
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
hurm... ye ke? xde pun paste...

ingat dah selamat tadi
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 16-02-2004, 04:03 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 769
Rep Power: 101
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
hurm... ye ke? xde pun post...

ingat dah selamat tadi
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for MLM Php script masrule Website Programming 0 24-01-2007 01:56 PM
Need Help With My Script marukochan Website Programming 1 07-12-2006 04:52 PM
Help Me With My First Php Script !!!! mya Website Programming 17 24-01-2004 06:12 PM
my script can't run..why? therion Website Programming 7 23-10-2003 05:14 PM
cgi script Seman Website Programming 6 16-09-2003 05:46 PM


All times are GMT +8. The time now is 10:23 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61