Jump to content

Not working!! please help..


sudip_dg77

Recommended Posts

<?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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.