validate input from form???
Posted 07 March 2006 - 11:29 AM
Whether or not the email validation evaluates to true, I delete the entry i just added to the validate table
Heres my code:
$username = $_POST['username'];
$Email = $_POST['Email'];
$validatename = $_POST['username'];
$validateemail = $_POST['Email'];
$insertval = "INSERT INTO validate SET
validatename = '$username',
validateemail = '$Email' ";
$emailval = @mysql_query("select validateemail from validate
where validateemail like '%student.example.com'
OR validateemail like '%EXAMPLE.IE'
OR validateemail like '%STAFF.EXAMPLE.COM'");
if (mysql_num_rows($emailval) == 1)
$sql = "INSERT INTO user SET
// delete from validate table here and also if $problem = true;
echo '<b>Invalid Email</b>';
$problem = true;
I also check whether or not the info was inserted into user table corectly etc...
but I get an error saying incorect argument passed to mysql_num_rows ?????? something like that??
Can anyone help?Its wrecking my head?
Posted 07 March 2006 - 12:43 PM
INSERT INTO user ( fullname, username, password, Email, DOB, phonenum) values( '$fullname', '$username', '$password', '$Email', '$DOB', '$phonenum')
Posted 07 March 2006 - 01:29 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users