sudip_dg77 Posted January 24, 2008 Share Posted January 24, 2008 <?php $val_code=$_POST['val_code']; $myDatabase = "kuuja_business"; $con = mysql_connect("localhost:3306","kuuja_admin","admin1"); if (!$con) { die('Could not connect to Database: ' . mysql_error()); } @mysql_select_db($myDatabase, $con) or die("Unable to select database"); $result_code = mysql_query("SELECT * FROM user WHERE rand_no = '$val_code'"); If (mysql_fetch_array($result_code)) { echo "Congratulations!!You are now a registered member of Dozentips Home Business!!"; echo "<a href="http://www.google.com">To continue please click here..</a>"; } else { echo "The code you entered is not valid, please click the back button on your browser and retry!!"; } mysql_close($con); ?> I get this error when i execute this... Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/kuuja/public_html/test/validate.php on line 370 Please help.. Link to comment https://forums.phpfreaks.com/topic/87610-not-working-please-help/ Share on other sites More sharing options...
kenrbnsn Posted January 24, 2008 Share Posted January 24, 2008 This line: <?php echo "<a href="http://www.google.com">To continue please click here..</a>"; ?> contains too many double quotes, either escape the ones in the middle of the string: <?php echo "<a href=\"http://www.google.com\">To continue please click here..</a>"; ?> or use single quotes to delimit the string: <?php echo '<a href="http://www.google.com">To continue please click here..</a>'; ?> Ken Link to comment https://forums.phpfreaks.com/topic/87610-not-working-please-help/#findComment-448131 Share on other sites More sharing options...
Stooney Posted January 24, 2008 Share Posted January 24, 2008 You already had this thread going, why did you make another? Link to comment https://forums.phpfreaks.com/topic/87610-not-working-please-help/#findComment-448141 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.