Page 1 of 1

ERROR MESSAGE: Notice: Use of undefined constant --- help

Posted: Fri Jun 02, 2006 2:27 pm
by tecktalkcm0391
I am trying to get this to work but i keep getting this message:
Notice: Use of undefined constant query5 - assumed 'query5' in /home/website/public_html/dir/Login/process.php on line 158
Here is the code I am using:

Code: Select all

<?php 

$username = 'test';
$pass = '1234';
// Create Activation Code 

$activationcode = rand(1111111,999999);


$query5 = @mysql_query("UPDATE database SET Code = '{$code}' WHERE User = '{$username}' AND Pass= '{$pass}'"); 
	   }
// Finish query	   
   if(!query5)
   {  
   	   return "An error has occurred. ";
                 
   } else { 

// codes 
}
?>

Posted: Fri Jun 02, 2006 2:31 pm
by Christopher
And there on line 158 is this:

Code: Select all

if(!query5)
which should be $query5 based on the previous line.

Posted: Fri Jun 02, 2006 2:39 pm
by tecktalkcm0391
thanks, I didn't catch that!