|
Posted by jay2006 on 12/21/06 06:23
Hi,
I keep getting this error after registration, does anyone know the fix?
Thanks.
Warning: mysql_num_rows(): supplied argument is not a valid MySQL
result resource in /insert.php on line 117
Warning: Cannot modify header information - headers already sent by
(output started at /insert.php:117)
in /insert.php on line 128
Warning: Cannot modify header information - headers already sent by
(output started at /insert.php:117)
in /insert.php on line 129
if($num3 != 0)
{
$msg = ("<b>Email Already Registered:</b><br>We are sorry but the
email you have entered has already been registered, please use another
or try to recover your previous account.");
mysql_close($link);
}
else
{
$sql = mysql_query("SELECT C_USER_NAME FROM CUSTOMER where
C_USER_NAME = '$cus[8]'", $link);
line 117>>> $num = mysql_num_rows($sql);
if($num != 0)
{
$msg = ("<b>Username Already In Use:</b><br>We are sorry but the
username you have chosen has already been taken. Please go back and try
another or add numbers to make it unique.");
mysql_close($link);
}
else
{
mysql_query("INSERT INTO customer (C_TITLE, C_FNAME, C_SNAME,
C_ADDRESS, C_ADDRESS2, C_TOWN, C_COUNTY, C_PCODE, C_TEL_NUM, C_EMAIL,
C_PWORD, C_USER_NAME, C_KEY, C_SECRET_A, C_SECRET_Q, C_MAIL_TYPE)
values
(UPPER('$cus[0]'),UPPER('$cus[1]'),UPPER('$cus[2]'),UPPER('$cus[3]'),UPPER('$add2'),UPPER('$cus[4]'),UPPER('$cus[5]'),UPPER('$cus[6]'),'$cus[7]',LOWER('$email'),'$pword','$cus[8]','$cUsername','$cus[10]','$cus[9]','$type')",
$link);
mysql_close($link);
setcookie("key:", $cUsername, time()+300); // sets cookie
header("Location: activate.php"); // directs to activation script*/
}
}
}
Navigation:
[Reply to this message]
|