[code=html]
<select name=”fonts” onChange=”update_master(‘fonts’, this.value);”>
<?php $fontsql = “SELECT * FROM pda_font”;
$query = mysql_query($fontsql) or die(mysql_error());
while ($row = mysql_fetch_object($query)) {
if($row->id == $thFont){
echo “<option value=”” . $row->id . “” SELECTED=”SELECTED”>” . $row->fontname . “</option>”;
} else {
echo “<option value=”” . $row->id . “”>” . $row->fontname . “</option>”;
}
}
?>
</select>
This is an HTML “select” object, being populated with font names arranged by their db index numbers.
Even though the name of the font is what is displayed in the object, The Client wishes another display onscreen beside it, showing the same name.
The form (“update_master”) to which “this.value” is being sent is pointed at another page which is purely PHP. I’ve tried to embed the HTML display in that page and have not succeeded.
I could of course query the database again.
Way up this script is a function in which I’ve declared a global $fName.
And, in another section of this script, I’ve declared the JavaScript var aaa.
So at one point I tried,
[code=html]<select name=”fonts” onChange=”aaa = this.value; update_master(‘fonts’, aaa);<?php $fName=aaa; ?>;”>
The form updated properly, but all I got in the readout was “aaa”.
Is there any way I could set $fName = (aaa)??
Any help will be considered life-saving…
Thanks,
Paul