Parse Error
Hey...
I'm getting a parse-error, but I can't seem to find it...it says Line 18 of my file, which is
<?php
$header = stripslashes($qry['header']);
?>
You don't see anything wrong with that, do you?
GAH
Hey...
I'm getting a parse-error, but I can't seem to find it...it says Line 18 of my file, which is
<?php
$header = stripslashes($qry['header']);
?>
GAH
Suzanne posted this at 03:20 — 16th July 2004.
She has: 5,507 posts
Joined: Feb 2000
look up a couple and down a couple of lines from the reported error.
kb posted this at 04:35 — 16th July 2004.
He has: 1,380 posts
Joined: Feb 2002
tried....heres the lines around it:
<?php
/* Get today's date */
$today = date(\"Y\");
/* Connect to database */
$dbh = mysql_connect (\"localhost\", \"username\", \"pass) or die('Database failure: ' . mysql_error());
$dbh2 = mysql_select_db (\"database\");
/* Select table */
$table = strtolower($title);
/* Find data */
$sql = mysql_query(\"SELECT header, body FROM $table\") or die(mysql_error());
$qry = mysql_fetch_array($sql)
/* Grab data */
$header = stripslashes($qry['header']);
$body = stripslashes($qry['body']);
?>
Suzanne posted this at 04:53 — 16th July 2004.
She has: 5,507 posts
Joined: Feb 2000
Look at the code coloured by the forum... You're missing a double quote around "pass".
Busy posted this at 05:35 — 16th July 2004.
He has: 6,151 posts
Joined: May 2001
Isn't header a reserved word?
kb posted this at 14:34 — 16th July 2004.
He has: 1,380 posts
Joined: Feb 2002
As to the missing quote...thats when i changed the correct password to "password". My fault.
I dont know about header...i'll try something else
kb posted this at 23:32 — 18th July 2004.
He has: 1,380 posts
Joined: Feb 2002
Found it...it was a missing ";" about 3 lines above the $header part
Thanks
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.