So, I’m new to php, and web design as a whole. I’m trying to use a select box with 4 options, 1-4, and want to generate tables based on the selection. I’m using a for() loop to generate the tables, but I need to get the select box value into the $numTables variable and have it update the form dynamically. If I hard code a value into the $numTables variable, it displays the tables no problem. If someone can help me see what I’m probably not seeing, it would be greatly appreciated, and you will get much good Karma.
This is the function I’m referencing in my code:
function Update(boxSelection){
var frm = document.getElementById("form1");
frm.$numTables = boxSelection;
}
and here is the php:
[php]
<?php $numTables = 1; $tableCtr = 1; echo 'How many would you like? // Here's where I call the Update function 1 2 3 4 For more than four, please contact us!
'; echo '| Enter Text: | '; echo 'Select a Font | '; echo '
|---|---|
| '; echo ' '; echo ' | '; echo ''; echo ''; echo ''; echo ''; do { echo ''; echo $row_Recordset4['font_name']; echo ''; } while ($row_Recordset4 = mysql_fetch_assoc($Recordset4)); $rows = mysql_num_rows($Recordset4); if($rows > 0) { mysql_data_seek($Recordset4, 0); $row_Recordset4 = mysql_fetch_assoc($Recordset4); } echo ''; echo ' | '; echo '
</table>
[/php]
Thank you, in advance for any help you can provide.