Its hard to explain, but...
I have started my own online games website. I wish to load hundreds of different games but all powered from just one php file. I started the same online games website last year without mysql and I ended up with hundreds of php files each for a different game. Now I want to load it from just one.
I understand that I can load data from the mySQL database with a code along the lines of:
Code: Select all
<?php
include 'config.php';
include 'opendb.php';
$query = "SELECT name, subject, message FROM contact";
$result = mysql_query($query);
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
echo "Name :{$row['name']} <br>" .
"Subject : {$row['subject']} <br>" .
"Message : {$row['message']} <br><br>";
}
include 'closedb.php';
?>
Thanks,
Tom.