OK I am upto the bit where i am trying to pull stuff from a sql db for the first time I might add...
heres the script..
<html>
<head>
<title> Our list of Jokes </title>
<head>
<body>
<?php
// Connect to the database server
$dbcnx = mysql_connect("localhost", "cloughie", "mypass");
if (!$dbcnx) {
echo( "<p>Unable to connect to the database server at this time.</p>" );
exit();
}
//select the jokes database
if (! @mysql_select_db("dbname") ) {
echo( "<p> Unable to locate the Joke database at this time.</p>" );
exit();
}
?>
<p>Here are the Jokes in our Database : </p>
<blockquote>
<?php
//Request the text of all the jokes
$result = mysql_query(
"SELECT JokeText FROM Jokes");
if (!$result) {
echo("<p>Error performing enquiry : " .
mysql_error() . "</p>!);
exit();
}
// Display the text of each joke in a paragraph
while ( $row = mysql_fetch_array($result) ) {
echo("<P>" . $row["JokeText"] . "</P>");
}
?>
This is the bit it is failing on... In particular line 47 the echo line... any ideas ? ?
I get the message "parse error"
cheers in advance...




Bookmarks