hey jim
welcome to the php world !
i have started learning php for real about 4 weeks now
so basically in 2005 i started learning php and mysql also
i am doing a project of a cinema
so far i have been able to creat all this dynamically
.jpg)
all this code is generated via php
and all the information for each div that shows the movie information is gathered from a mysql page
let me show u some code
<?php
include ( 'menu.html' );
// set your infomation.
$dbhost='localhost';
$dbusername='root';
$dbuserpass='';
$dbname='film';
// connect to the mysql database server.
$link_id = mysql_connect ($dbhost, $dbusername, $dbuserpass);
// select the specific database name we want to access.
$dbname=$dbusername."_".$dbname;
if (!mysql_select_db($dbname)) die(mysql_error());
$result = mysql_query("SELECT * FROM films");
if ($result === false)
{
echo 'Could not run query: ' . mysql_error();
exit;
}
echo "\t <div id=\"film\">\n \n";
echo "\t <h2>Film Information:</h2>\n \n";
while ($row = mysql_fetch_row($result))
{
echo "\t \t <div id=\"filmdetails\">\n";
echo "\t \t \t<img src=\"$row[2]\" alt=\"$row[1]\" align=\"left\">\n";
echo "\t \t \t<p></p>\n";
echo "\t \t \t<p>Name: $row[1]</p>\n";
echo "\t \t \t<p></p>\n";
echo "\t \t \t".$row[3]."\n";
echo "\t \t \t<p>Cast:$row[5]</p>\n";
echo "\t \t \t<p>Book at: <a href=\"book.php?id=assault19\"> 19:00 [/url] <a href=\"book.php?id=assault21\"> 21:00 [/url] <a href=\"book.php?id=assault23\"> 23:00 [/url] </p>\n";
echo "\t \t</div>\n";
echo "\t <p></p> \n \n";
}
echo "\t </div>\n";
?>
the thing i am going to do now is when u see book at
<a href=\"book.php?id=assault19\">
i want to get the id assault19 from a database also
should be done by tonight
;)