Still fumbling with this...
Ok, I have a "comics" database with a "comics" table with three fields:
id - 3 number id for each comic, set to auto_increment
date - date of publication
image_location - the URL for the strip
I have a page on the toplevel folder named "comic.php" with the script:
<?
include ("comic_include.php");
$comic_id = mysql_query (select * from comics where id='$strip_id'")
?>
The "comic_include.php" contains the database access info:
<?
$db_name="Comics";
$db_user="xxxx";
$db_password="xxxx";
$db_host="localhost";
$connection=mysql_connect("$db_host","$db_user","$db_password") or die ("error connection to sql");
$db=mysql_select_db($db_name ,$connection) or die ("error connection to Comics database");
?>
I changed the user/pass to x's for posting purposes of course. And in the index page where I'm trying to display the comic strips, I have a table with the HTML:
<?
<img src="comic.php?comic_id=4">
?>
Obviously this doesnt work, as Im sure there are a great number of mistakes im making, I just dont know what to change to what. I notice I have no code to tell the query to bring out the location of a strip...
(This is only my second day doing anything with PHP or MySQL, I was going to post this under the NewB section but Database seemed more appropriate.)