//connect to database
if ($submit) {
mysql_connect($db_host,$db_username,$db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
//run query to retrieve data from database for posts
$query = "SELECT name, email, message, date, FROM guestbook order by id DESC LIMIT 10";
$result = mysql_query($query);
//connect to database
if($submit)
{
mysql_connect($db_host,$db_username,$db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
//run query to retrieve data from database for posts
$query = "SELECT name, email, message, date, FROM guestbook order by id DESC LIMIT 10";
$result = mysql_query($query);
__________________ Please login or register to view this content. Registration is FREE - Latest Articles: Please login or register to view this content. Registration is FREE , Please login or register to view this content. Registration is FREE
No, shold work like that. Problems come when you're trying to access a multi-dimension array, I think. Ex:
PHP Code:
echo "blah $array['key']['key'] blah";
// should be
echo "blah {$array['key']['key']} blah";
// or
echo "blah " . $array['key']['key'] . " blah";
__________________ Please login or register to view this content. Registration is FREE - Latest Articles: Please login or register to view this content. Registration is FREE , Please login or register to view this content. Registration is FREE