What I'm trying to do is use phpbb3 to input text into the forum and mysql db,
then print it on the index.php, however when I'm using the following code, all it prints is m.
What am I doing wrong here? As far as I understand it, the $SQL is the query, the $result is the command to query, and the $db_field sorts out the queried information in whichever way I want (mysql_fetch_array, mysql_fetch_assoc, mysql_result - I've tried all of these.)
I've got that much figured out (I think)...
But I really don't understand why this doesn't work. All the names everywhere should be good, I've triple checked them.
Code: Select all
<?PHP
$user_name = "root";
$password = "";
$database = "phpbb3";
$server = "localhost";
mysql_connect($server, $user_name, $password);
$SQL = "SELECT post_time, poster_id, post_subject, post_text FROM phpbb_posts";
$result = "mysql_query($SQL)";
$db_field = "mysql_result($result)";
{
print $db_field['post_time'] . "<BR>";
print $db_field['poster_id'] . "<BR>";
print $db_field['post_subject'] . "<BR>";
}
?>Code: Select all
m
m
m
Thanks a ton for any info provided.