No announcement yet.

passing value from ssi to php

  • Filter
  • Time
  • Show
Clear All
new posts

  • passing value from ssi to php

    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"-->

  • #2
    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>&nbsp;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);

    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=$fla g\"><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>&nbsp;<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>";



    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.