I will show my code again. As you can see, I tried ending the print statements but it still has an error that says:
Parse error: parse error, unexpected T_STRING in /home/virtual/site12/fst/var/www/html/login.php on line 17
I need the print staments on lines 15 through 29 to print. It will print the print statement on line 15 just fine as long as that is the only print statement. I just don't know why it can't print the rest of the lines?
<?php
if ($submit) :
$db=mysql_connect("localhost","xxxxxx","xxxxxxx") or die ("cant connect");
mysql_select_db("xxxxxxxx",$db) or die ("cant change");
$result=mysql_query("select * from joborder where user='$username'",$db) or die ("cant do it");
while ($row=mysql_fetch_array($result)) {
if ($row["pass"]==$password) {
printf("Welcome " .$row['fname']." of ".$row['organization']."!");
printf("<form method="post" action="sendmail.php">");
printf("Email: <input name="email" type="text" /><br />");
printf("Message:<br />");
printf("<textarea name="message" rows="15" cols="40">");
printf("</textarea><br />");
printf("<input type="submit" />");
printf("</form>");
}
}
else:
?>
<form method=post action="<?echo $PHP_SELF?>">
<h2 align="center">Welcome to the EyeOpener Login!<br>
</h2>
<table width="487" height="128" border=0 align="center" cellpadding=2 cellspacing=0>
<tr>
<td width="130"><strong>Username:</strong></td>
<td width="152"><input type="text" name="username" size=15></td>
<td width="126" rowspan="3"><div align="center">Do You Need To<br>
<a href="register.php">Register</a>? </div></td>
<tr>
<td><strong>Password:</strong></td>
<td><input type="password" name="password" size=15></td>
<tr>
<td> </td>
<td><input type="submit" name="submit" value="Log In"></td>
<tr>
<td colspan="3"><img src="logo.jpg" width="300" height="117"></td>
</table>
</form>
<? endif; ?>
ANY MORE SUGGESTIONS! Thanks