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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.