Hello,
I am a very new newbie at PHP and need some help with adding this one data to the field "catid."
Here's the code I have for the catid form part..
Code:
echo "<br><b>Issue:</b> <select name=\"catid\">";
$selcat = sql_query("select catid, title from ".$prefix."_stories_cat order by catid DESC limit 2", $dbi);
while(list($catid, $title) = sql_fetch_row($selcat, $dbi)) {
if ($catid==$title) {
$sel = "selected ";
}
echo "<option $sel value=\"$catid\">$title</option>";
$sel = "";
}
echo "</select>";
here's the code i have to enter the cat id into the database...
Code:
$result = sql_query("insert into ".$prefix."_queue values (NULL, '$uid', '$name', '$subject', '$story', '$storyext', now(), '$topic', '$catid', '$alanguage')", $dbi);
I have a normal page, and then a preview page. I am also having trouble with creating the selected field. After the you select the catid and then preview, the selected field becomes default again. I tried to fix it with the $sel but had not luck, i just left it in there just in case one day I or anyone of you guys can figure it out
Thank You
__________________
-Precision Out
|