How about adding error_reporting(E_ALL); at the beginning of index.php, to see if any errors are being generated. I use it all the time I'm developing to make sure I don't have any errors, uninitialised variables are the ones that slip through. They only generate warnings, but I prefer to kill them all with isset() checks.
Taking a quick at the output_fns.php... is the insert function being called at all?
you initialise the array...
$Error = array("email" => "","pwd" =>"","pwd1"=>"");
then test if it's empty...
if(empty($Error))
{
insert($email,$pwd,$nama,$tgl_lahir,$jekel,$tmpt,$ alamat,$kota,$propinsi);
Try changing the declaration of the variable to $Error=array();
then the check for errors may work, but if (count($Error)==0) might be a more reliable check.
Hi Paul,i've tried it.It displasy error says that undefined index..If i put the queries in the display_login_form(),it works,The database was updated.All i'm trying to do is to make another page that contains the queries function..Thanks a lot...
Does undefined index appear when $Error['email']="Email error" ?
Because I'd expect that. You can just add to the errors array without specifying an index...
$error[]="Email error";
...
$error[]="Password error";
Personally, I just use a string ($errors) and add to it with each error message wrapped in a <li>...</li> tag then display as follows..
print "<ul>$errors</ul>";
Yes,it does.Paul,what do you do usually when dealing with member registration?Will you put the insert function within the registration page or you put the function in a another page?Thanks a lot..
There are currently 1 users browsing this thread. (0 members and 1 guests)