PDA

View Full Version : Please help me?????


szms
Sun 10th Aug '03, 9:25pm
I want to execute the following menu as many times as the user want. Please take a look and give me some suggestion.
First the user will be asked the number of time he/she wants to execute the menu bar in the same page (without opening a new page).

Please help me???

<form action="InsertFunctionComponent.php" method="GET">


<br><br><b>How many times you want</b>
<input type="text" name="number" Size = "30">
<br><br>
<?php
if($submit)
{
?>
<br>Select any of the following Function<br><br>
<select name = "FunctionMenu" Multiple>
<?php
foreach ($Function_Name as $Existing_Function)
print " <option value=\"$Existing_Function \">$Existing_Function</option>";
?>
</select>
<input type="submit" value="Submit" name="submit">
<input type="reset" value="Reset" name="Reset">

</form>
<?php
}

else
{
---do something---
}
?>

szms
Mon 11th Aug '03, 10:40pm
I tried the following code but I am not getting the output that I am looking for. I want one menu at a time and after pressing the submit button another menu (same one) will be appeared in the same place if user choose 2 as number. Plese give me some suggestion.


<?php
if($submit != "submit" || $submit != "send")
{
print "<form action=\"index.php\" method=\"GET\">";
print "<p>Enter in the number of times below:</p>";
print "<input type=\"text\" name=\"number\" size=\"30\">";

print "<input name=\"submit\" type=\"submit\" value=\"send\">";
print "<input name=\"reset\" type=\"reset\" value=\"reset\">";
print "</form>";
}
if ($submit == "send")
{

$main_count = 1;
$months = array("January","February","March","April","May","June","July",
"August","September","October","November","December");
$number = $HTTP_GET_VARS["number"];
print "<form action=\"index.php\" method=\"GET\">";
while($main_count <= $number)
{
print "<select name=\"something\" value=\"$main_count\" multiple";
for ($x_f=0; $x_f<=count($months); $x_f++)
{
print "\t<option value=\"$x_f\">".$months[$x_f-1]."\n";
reset($months);
}
print "</select>";
print "<br>";
$main_count++;
}
print "<input name=\"submit\" type=\"submit\" value=\"submit\">";
print "<input name=\"reset\" type=\"reset\" value=\"reset\">";
print "</form>";
}
if ($submit == "submit")
{
//you insert all of the data from the form element into the DB here
//make sure to use $HTTP_GET_VARS[""]; for you variables
print "Hello World";
}
?>