help!!!! what's wrong with this error??????????
Posted: Fri May 14, 2004 1:44 pm
halo, can anyone help me to solve this problem????? i can't display the my profile.... this below error come's out... may i know wat wrong with this coding???????????
Parse error: parse error, unexpected T_STRING in C:\Apache2\htdocs\fn\userview.php on line 35
?>
Code: Select all
<?php
<html>
<body>
<head>
<title>List MY Records</title>
</head>
<h1>My Profile</h1></center>
<?php
if(isset($_POST["submit"]))
{
$selectStmt = "select * from users where username = '{$_GET['username']}'";
if(!($link=mysql_pconnect('localhost', 'root', '')))
{
echo 'Error connecting...Please send the following information to the site administrator!';
exit();
}
mysql_select_db('mobile', $link)or die("There was an error connecting to the database. Please send the following information to the site administrator.<br /><br />".mysql_error());
if(!($result=mysql_query($selectStmt, $link))){
echo 'Error executing statement...Please send the following information to the site administrator! '.mysql_error();
exit();
}
if(!($row=mysql_fetch_object($result))){
echo 'Internal Error: The entry does not exist! '.mysql_error();
exit();
}
printf("<FORM target="_blank" METHOD="post" ACTION="%s"><PRE>\n", "update.php?userID=$row->userID");
printf("</br>userID:
<INPUT TYPE=text SIZE=35 NAME=userID VALUE="%s">
<br>\n",$row->userID);
printf("userName:
<INPUT TYPE=text SIZE=35 NAME=username VALUE="%s">
<br>\n",$row->username);
printf("Password:
<INPUT TYPE=text SIZE=35 NAME=password VALUE="%s">
<br>\n",$row->password);
printf("Email:
<INPUT TYPE=text SIZE=35 NAME=email VALUE="%s">
<br>\n",$row->email);
printf("<INPUT TYPE=submit VALUE=Modify Name=submit>");
printf("</PRE></form>");
mysql_free_result($result);
}
?>
</body>
</html>Code: Select all
<?php
?>Parse error: parse error, unexpected T_STRING in C:\Apache2\htdocs\fn\userview.php on line 35
?>