dynamic buttons
Posted: Mon Aug 16, 2004 12:56 pm
HI guys,
I am making a dynamic list of buttons (number of buttons will change depending on how many people are in the list) and I want to have a button associated to each name. When the button is clicked I want a variable (the name) to be sent to another page. I cant get this working so maybe someone has some suggestions...
code:
<?php
for ($print_command=1;$print_command<$command_index;$print_command++){
?>
<tr>
<td ><? echo"$name[$print_command]";?> </td>
<td ><input type="button" onclick="window.location='info.php' " value="View Profile"></td>
</tr>
<?
}
?>
How do I send the $name[$print_command] to the info.php page....... my object is to create a list of names and next to each name there will be a button. If the button is clicked then the specif information for that person will be displayed in an iframe. any suggestions are appreciated and thanks again for the help.
I am making a dynamic list of buttons (number of buttons will change depending on how many people are in the list) and I want to have a button associated to each name. When the button is clicked I want a variable (the name) to be sent to another page. I cant get this working so maybe someone has some suggestions...
code:
<?php
for ($print_command=1;$print_command<$command_index;$print_command++){
?>
<tr>
<td ><? echo"$name[$print_command]";?> </td>
<td ><input type="button" onclick="window.location='info.php' " value="View Profile"></td>
</tr>
<?
}
?>
How do I send the $name[$print_command] to the info.php page....... my object is to create a list of names and next to each name there will be a button. If the button is clicked then the specif information for that person will be displayed in an iframe. any suggestions are appreciated and thanks again for the help.