php guestbook -parse error!! :O

Codes here !

Moderators: macek, egami, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 60
Joined: Sun Feb 02, 2003 2:10 am
Location: Leeds, Uk

php guestbook -parse error!! :O

Post by php-punk » Wed Feb 19, 2003 1:29 pm

rite so far i have the following code

Code: Select all

//display the stats in a table

//connect to the DB
$Connect=mysql_connect(localhost,***,***) or die("Sorry, unable to connect to DataBase(1)");

//select DB

//setting the query in a variable, the query, in this case it SELECTS teh table and outputs int a HTML table
$query="select * FROM adamgb";
//running the actual query
$result=mysql_query($query) or die("Sorry, unable to query DataBase(2)");

//rows return?

echo("<b>Straight to the Point</B> Guestbook")

//fetch results and display in HTML table
echo("<b>$returned results</B>");
      //putting the results into a Array
         //looping thru the array and outputing the results into a table
echo("<table border=\"0\" celpadding=\"5\" cellspacing=\"5\">")
echo("<td width="81" bgcolor=#C6EFF7 >&.$row[&name&].&</td>")
echo("<td width="641" bgcolor=#C6EFF7><div align="left">&.row[Date&].&</div></td>")
    echo("<td BGCOLOR=#EOEOEO><p>&.$row[&email&].&</p><p>&.$row[&website&].&</p></td>")
    echo("<td bgcolor=#EOEOEO>&.$row[Comments]&.&</td>")
  echo("</table><p>"); </p>
//cleaing up the memory
mysql_free_result($result); </p>

but im getting a parse error on line 21 it is telling me it expects:
`','' or `';'' but i cant see where or why it would go in?! can anywould help me!?
Last edited by php-punk on Thu Feb 20, 2003 2:51 am, edited 1 time in total.

User avatar
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Post by Redcircle » Wed Feb 19, 2003 10:00 pm

you should have a semi-colin after every statement. You are missing a bunch of them.

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Post by Oleg Butuzov » Wed Feb 19, 2003 11:20 pm

1) at the next time dont publish your login and password.
every body can hack your site.
2) parser error? is the was a line number? can you tell as this info to us...

3) echo "<b><font size=1>WORK</font></b>"; - as you see you dont need " () - chars....

New php-forum User
New php-forum User
Posts: 60
Joined: Sun Feb 02, 2003 2:10 am
Location: Leeds, Uk

Post by php-punk » Thu Feb 20, 2003 9:52 am

thx guys, i got it working, it was the semi's that it wanted, cudn't see!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests