Hi all.
Am I missing something here?
Heres what my DB looks like:
CREATE TABLE page_data (
id tinyint(4) NOT NULL auto_increment,
page text,
content text,
PRIMARY KEY (id),
UNIQUE KEY id (id)
) TYPE=MyISAM;
INSERT INTO page_data VALUES (1, 'homepage', 'text for homepage');
INSERT INTO page_data VALUES (2, 'homepage full version', 'homepage full version text');
INSERT INTO page_data VALUES (3, 'questions', 'questions text');
INSERT INTO page_data VALUES (4, 'dates', 'dates text');
INSERT INTO page_data VALUES (5, 'what they are saying', 'what they are saying text');
and my script to print out the db.
<?php
// connect to the database
$dbh=mysql_connect ("localhost", "transitc_content", "content")
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("transitc_content");
$result = mysql_query("SELECT * FROM page_data",$dbh);
printf("First Name: %s<br>\n", mysql_result($result,0,"homepage"));
?>
What did I forget?
Thanks!
Matt
😕