carp
Sat 12th Aug '00, 9:10pm
I need help
lets say that I have a table set up with three things in it:
title
graphic
link
the title contains the text for the title above a page. the graphic contains the url to a graphic (graphics/logo.gif), and the link contains the link color (#000080).
how would i retrieve this and put it in html?
i tried this:
$query = "select * from templates";
$result = mysql_db_query ($database, $query);
$numOfRows = mysql_num_rows ($result);
for ($i = 0; $i < $numOfRows; $i++){
$title = mysql_result ($result, $i, "title");
$link = mysql_result ($result, $i, "link");
$graphic = mysql_result ($result, $i, "graphic");
function showheader($titlemessage) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE> <?php echo $title ?> - <?php echo $titlemessage ?> </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="<?php echo $link ?>" VLINK="<?php echo $link ?>">
<img src="<?php echo $graphic ?>"><br>
what am i doing wrong???
[Edited by carp on 08-12-2000 at 08:11 PM]
lets say that I have a table set up with three things in it:
title
graphic
link
the title contains the text for the title above a page. the graphic contains the url to a graphic (graphics/logo.gif), and the link contains the link color (#000080).
how would i retrieve this and put it in html?
i tried this:
$query = "select * from templates";
$result = mysql_db_query ($database, $query);
$numOfRows = mysql_num_rows ($result);
for ($i = 0; $i < $numOfRows; $i++){
$title = mysql_result ($result, $i, "title");
$link = mysql_result ($result, $i, "link");
$graphic = mysql_result ($result, $i, "graphic");
function showheader($titlemessage) {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE> <?php echo $title ?> - <?php echo $titlemessage ?> </TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="<?php echo $link ?>" VLINK="<?php echo $link ?>">
<img src="<?php echo $graphic ?>"><br>
what am i doing wrong???
[Edited by carp on 08-12-2000 at 08:11 PM]