ok my problem is that when i had a loop with the 'for' loop, and for some reason when i go to hit the submit query button, nothing happens, as if there was no 'action' attribute in the form tag. heres exact coding i have.
this works ie. when you hit the submit button, it opens up the correct page:
<form action=blah.php method=get>
dsfsdf
<select name=song>
<?
$listofsongs = array (1 => "blah","blah");
for ($counter=1; $counter<104; $counter++){echo"<option>$listofsongs[$counter]</option>";
}
echo "</select>";
echo "<input type=submit></form>";
?>
however this does not work, ie, when u hit the submit button nothing happens; as if there was no action attribute.
<form action=blah.php method=get>
dsfsdf
<select name=song>
<?
$listofsongs = array (1 => "blah","blah");
for ($counter=1; $counter<104; $counter++){echo"<option>$listofsongs[$counter]</option>";
}
echo "</select>";
for ($counter=1; $counter<104; $counter++)
{echo"<input type=hidden name=songtimes[] value=\"$listofsongs[$counter]\">";
}
echo "<input type=submit></form>";
?>
notice the ONLY change is the addition of the bolded syntax. Now why does this for looping disable the submit button?did you check the source of the page (not the php but the resulting html)?
you should always quote the html attribute
<form method="get" action="bla.php">
<select name="song">
echo"<input type=\"hidden\" name=\"songtimes[]\" value=\"$listofsongs[$counter]\">";
...yeah i checked the html and it didnt display what it was supposed to.
dont worry though, i found a successful way around this problem. thanks for the input.
this works ie. when you hit the submit button, it opens up the correct page:
<form action=blah.php method=get>
dsfsdf
<select name=song>
<?
$listofsongs = array (1 => "blah","blah");
for ($counter=1; $counter<104; $counter++){echo"<option>$listofsongs[$counter]</option>";
}
echo "</select>";
echo "<input type=submit></form>";
?>
however this does not work, ie, when u hit the submit button nothing happens; as if there was no action attribute.
<form action=blah.php method=get>
dsfsdf
<select name=song>
<?
$listofsongs = array (1 => "blah","blah");
for ($counter=1; $counter<104; $counter++){echo"<option>$listofsongs[$counter]</option>";
}
echo "</select>";
for ($counter=1; $counter<104; $counter++)
{echo"<input type=hidden name=songtimes[] value=\"$listofsongs[$counter]\">";
}
echo "<input type=submit></form>";
?>
notice the ONLY change is the addition of the bolded syntax. Now why does this for looping disable the submit button?did you check the source of the page (not the php but the resulting html)?
you should always quote the html attribute
<form method="get" action="bla.php">
<select name="song">
echo"<input type=\"hidden\" name=\"songtimes[]\" value=\"$listofsongs[$counter]\">";
...yeah i checked the html and it didnt display what it was supposed to.
dont worry though, i found a successful way around this problem. thanks for the input.