Shane
Sat 27th Jan '01, 2:48am
Ok. I have this as a situation. The mian page is index.shtml and when I want the page to load, I want this php file executed: <?php
require("something");
$Result = mysql_query("SELECT * FROM quote_rotation");
$total_rotation = mysql_num_rows($Result);
$rand = rand(1,$total_rotation);
$result = mysql_query("SELECT quote FROM quote_rotation WHERE quoteid='$rand'");
$row = mysql_fetch_row($result);
$quote = $row[0];
if ($quote != "") {
echo "$quote";
} else {
header ("Location: http://www.tribalwar.com");
}
?>
but I want to replace
echo "$quote";
with some return the value, so on the index.shtml file displays it. Any help? :D
require("something");
$Result = mysql_query("SELECT * FROM quote_rotation");
$total_rotation = mysql_num_rows($Result);
$rand = rand(1,$total_rotation);
$result = mysql_query("SELECT quote FROM quote_rotation WHERE quoteid='$rand'");
$row = mysql_fetch_row($result);
$quote = $row[0];
if ($quote != "") {
echo "$quote";
} else {
header ("Location: http://www.tribalwar.com");
}
?>
but I want to replace
echo "$quote";
with some return the value, so on the index.shtml file displays it. Any help? :D