View Full Version : passing value from ssi to php
joyce
Wed 5th Sep '01, 7:30am
i want to pass a value to my disimage.php from shtml. is the code correct? it does not pass any value to that php page. what is wrong with it? please help!
the code:
<!--#include virtual="/review/admin/disimage.php?subcat=Net"-->
joyce
Thu 6th Sep '01, 6:15am
below is the code from disimage.php. i want to pass the value of subcat,
<!--#include virtual="/review/admin/disimage.php?subcat=Net"-->
to the php file as below.
echo "<table width='100%' border='0' cellspacing='1' cellpadding='0' align='center'><tr bgcolor=#000000><td>";
echo "<font face='verdana' color=#FFFFFF size='2'><b> Categories</b></font></td></tr>";
echo "<tr height=10></tr></table>";
global $subcat;
$table = "cat_review";
$field = "*";
$criteria = "order by cat_cat asc";
$review_obj=new review_DB($dbhost,$dbusername,$dbpasswd,$db);
$getdata=$review_obj->get_data($table, $field, $criteria);
$data=$getdata[0];
$numrows=$getdata[1];
if ($numrows > 0)
{
for ($i=0; $i < $numrows; $i++)
{
$id = $data[$i][0];
$cat = $data[$i][1];
$subcat = $data[$i][2];
$title = $data[$i][3];
$desc = $data[$i][4];
$image = $data[$i][5];
echo"<table width=100% border=0 cellpadding=1 cellspacing=1>";
echo "<tr><td width=20%>";
echo"<table width=100% border=0 cellpadding=1 cellspacing=1>";
echo "<tr><td width=80%><a href=\"../admin/display.php?gid=$id&cat=$cat&subcat=$subcat&title=$title&desc=$desc&image=$image&flag=$flag\"><img src=\"".$data[$i][5]."\" width=80 height=120 border=0></a>\n</td></tr>";
echo "</table>";
echo "<td width=80%>";
echo "<table width=100% border=0>";
echo "<tr><td width=100%><font face=arial size=3><b><u>$subcat</u></b></font> <font face=arial size=1>($cat)</font></td></tr>";
echo "<tr><td width=100%><font face=arial size=2><b><i>$title</i></b></font></td></tr>";
echo "<tr><td width=100%><font face=arial size=2>$desc</font></td></tr>";
echo "</table>";
echo "</table>";
echo "<hr>";
}
}
vBulletin® v3.8.0 Release Candidate 1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.