PHP Still inserts data even if the condition is not met (IE)
Posted: Thu Jan 11, 2007 3:44 am
Hi guys i'm having this weird problem in php / IE. I have a page with a form and text boxes and when I click the submit button, It will be posted to a second php page which contains this code.
It all works fine in firefox however.
What could possibly be wrong with my code? Please help me guys. I've been stuck in the office trying to figure this one out.
Thanks. ^_^
It all works fine in firefox however.
What could possibly be wrong with my code? Please help me guys. I've been stuck in the office trying to figure this one out.
Thanks. ^_^
Code: Select all
<?
require_once("../../common/include.php")
include_once("../../lib/functions.lib.php")
include_once("postVar.php");
$query = "SELECT * from $default_table_accounts WHERE loginemail='$loginemail'";
$result = db_query($query) or die(db_error());
if(db_num_rows($result)) {
include_once("hiddenFields.php");
-- go back to previous page --
} else {
$password = generate_password();
$refcode = generate_refcode();
$applicationdate = date("Y-m-d H:i:s");
$querystr = "INSERT INTO $default_table_accounts (professionalcapacity,operationarea,country,desiredstartingdate,desiredsalary,firstname,
middlename,lastname,gender,birthdate,maritalstatus,nationality,phonenum,username,loginemail,password,address,zipcode,city,homecountry,applicationdate,regstatus,refcode) VALUES ";
$querystr .= "('$professionalcapacity','$operationarea','$country','$desiredstartingdate','$desiredsalary','$firstname'
,'$middlename','$lastname','$gender','$birthdate','$maritalstatus','$nationality','$phonenum','$loginemail','$loginemail','$password','$address','$zipcode','$city','$homecountry','$applicationdate','I','$refcode')";
$querystr .= db_query($querystr) or die(db_error());
}
?>