Forum Moderators: coopster
how can I use the same JS drop box format in PHP
of course using the JS script in PHP is fine
however I have no clue on how to populate the JS drop box with PHP links
can a drop box be achieved using only PHP, is there a model?
or may I use and tweak the following to fit PHP
<<<
<form name="form1">
<select name="linkslist" onChange="go(this)">
<option value=>Select an option</option>
<!--<option value="rcpbook/rcpacom1.html">Any name..
option> -->
</select>
</form>
>>>
the question is how can I pass <? link to DB?>
instead of the plain html link in the JS option value?
thank you
regards
<?php
echo
"
<form name=\"form1\">
<select name=\"linkslist\" onChange=\"go(this)\">
<option value=>Select an option</option>";
$sql="SELECT wherever,whatever FROM table WHERE what";
$dh=mysql_query($sql);
while ($r=mysql_fetch_row($dh)) echo "<!--<option value=\"$r[0]\">$r[1]<option> -->";
echo
"
</select>
</form>
";
?>