Hello,
Following is my php code and I call it on a button click:
<?php
$val_code=$_POST['val_code'];
$myDatabase = "business";
$con = mysql_connect("localhost:3306","admin","admin");
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);
?>
But I get an error saying:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in /home/kuuja/public_html/test/validate.php on line 371
Can someone please help?
Regards,
Sudip