This is my first post in these forums, i am a newbie (but everyone is at some stage) i have what i believe is a simple problem yet i cant find an explanation.
I got a book "Mysql/PHP Database Applications by Jay Greenspan and Brad Bulger"
Now ive started studying this book and was givin sample code to write a simple guestbook application.
Below is the code word for word letter for letter from the book.
Code: Select all
<?php
include('dbconnect.php');
if ($submit == 'Sign!')
{
$query = 'insert into guestbook
(name,location,email,url,comments) values
('$name', '$location','$email','$url','$comments')'
;
mysql_query($query) or
die (mysql_error());
?>
<h2>Thanks!!</h2>
<h2><a href="view.php">View My Guest Book!!!</a></h2>
<?php
}
else
{
include('sign.php');
}
?>Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\school\create_entry.php on line 8
Can anyone help
I imagine that it is quite a simple problem however i do not have the knowledge to solve it.
Thanks in advance