I have this:
Parse error:syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
on line 56 and i don't know how to fix it as i can't see anything that is obviously wrong. I know i'm probably overlooking something incredibly simple but i wondered if you could help me. Here is the code. Edit:The line numbers are next to the lines.
PHP Code:
1<html> 2<head> 3<title> 4<?php 5if(!isset($_COOKIE['User_Buggy'])) 6{ 7print("You Have Not Logged In"); 8} 9else 10{ 11$user=$_COOKIE['User_Buggy']; 12print("Welcome $user"); 13} 14php?> 15</title> 16</head> 17<body> 18<?php 19if(!isset($_COOKIE['User_Buggy'])) 20{ 21print("You Have Not Logged In"); 22print("<br> Login <a href=\"http://www.thebuggychatroom.info/login.html\">here</a>"); 23die(" "); 24} 25$user=$_COOKIE['User_Buggy']; 26$username="username"; 27$pass="password"; 28mysql_connect("localhost",$username,$pass) or die("Cannot connect to database"); 29mysql_select_db("database") or die("Cannot select database"); 30$query="SELECT *FROM accounts"; 31$result=mysql_query($query); 32$num=mysql_numrows($result); 33$i=0; 34while($i<$num) 35{ 36$ch_uname=mysql_result($result,$i,"username"); 37if(ch_uname==$user) 38{ 39$email=mysql_result($result,$i,"email"); 40$avatar=mysql_result($result,$i,"avatar"); 41$validate=mysql_result($result,$i,"validate"); 42$c=1; 43$d=0; 44if($validate==$c) 45{ 46print("Welcome $user"); 47print("<br> Your avatar is <img src=\"http://$avatar\" width=\"300\" height=\"300\"><br>"); 48print("<a href=\"http://www.thebuggychatroom.info\">[Home-</a>"); 49print("<a href=\"http://articles.thebuggychatroom.info\">Articles-</a>"); 50print("<a href=\"http://www.thebuggychatroom.info/logout.php\">Logout]</a> 51mysql_close(); 52die(" "); 53} 54else 55{ 56print("You need to validate your account"); 57print("<br>"); 58print("<form action="vemail.php\" method=\"post\"><input typ=\"hidden\" 59name=\"email\"value=\"$email\"><input type=\"Submit\" value=\"Resend Validation 60Email\"></form>"); 61mysql_close(); 62die(" "); 63} 64$i++; 65} 66mysql_close(); 67die("Your account may have been deleted and no longer exists on the database"); 68php?> 69</body> 70</html>
Thank you for your help and thank you for taking some of your precious time to help me.
Last edited by Jabus10 : 05-10-2006 at 04:12 PM.
|