Hello,
I have just writen a script that allows people to query a database and view their
account details, and I' want to include a link infront of each results that allows a person to change the contents of their account each time i run this script i always have an error that says:
Parse error: parse error, unexpected '<' in d:\phpweb\tmp5bejqwn3ef.php on line 21
The script works well till i added the links.
Please what am I doing wrong?
My script is below:
<?php
//create short variable names
$Email = $HTTP_POST_VARS['Email'];
$Password = $HTTP_POST_VARS['Password'];
//Check for required fields
if (!$Email || !$Password){
echo '<p>All required fields have not been completed. Please try again.</p>';
exit;
}
$Email = addslashes($Email);
$Password = addslashes($Password);
//connect to the MySQL server and select database
$session = mysql_connect("localhost", "root", "platinum") or die(mysql_error());
if (!$session)
{
echo 'Error: Could not connect to database. Please try again later.';
exit;
}
mysql_select_db('xplosive') or die(mysql_error());
$query = "select*
from customer_account
where Email = '$Email' and Password = '$Password'";
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
echo '<p style "font-size:14pt><strong>Account Number:</strong> ';
echo stripslashes($row['Account_Number']);
echo '<br><br>First name: ';
echo stripslashes($row['First_name']).<a href="changename.html">Change</a>;
echo'<br><br>Last name: ';
echo stripslashes($row['Last_name'])<a href="changename.html">Change</a>;
echo '<br><br>Email: ';
echo stripslashes($row['Email'])<a href="changeemail.html">Change</a>;
echo '<br><br>Address: ';
echo stripslashes($row['Address'])<a href="changeadd.html">Change</a>;
echo '<br><br>Date of Birth ';
echo stripslashes($row['Date_of_Birth']);
echo '<br><br>Phone Number ';
echo stripslashes($row['Phone'])<a href="changephone.html">Change</a>;
echo '<br><br>Sex ';
echo stripslashes($row['Sex']);
echo '</p>';
?>