switch form actions? not working
Posted on
16th Feb 2014 07:03 pm by
admin
i want on submit to go to different pages according to the CatID
Code: <?php $CatID=$_GET['CatID'];
if (isset($CatID)) {
Did you know?Explore Trending and Topic pages for more stories like this.
}
switch ($CatID)
{
case 1:
echo '<form action="new-product-full-page-citycountry.php" method="get">';
break;
case 2:
echo '<form action="new-product-full-page-region.php" method="get">';
break;
} ?>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150"><select name="CatID" onChange="getState(this.value)">
<option value="0">Select Category</option>
<?php
do {
?>
<option value="<?php echo $row_RsCategories['CategoryID']?>"><?php echo $row_RsCategories['CategoryName']?></option>
<?php
} while ($row_RsCategories = mysql_fetch_assoc($RsCategories));
$rows = mysql_num_rows($RsCategories);
if($rows > 0) {
mysql_data_seek($RsCategories, 0);
$row_RsCategories = mysql_fetch_assoc($RsCategories);
}
?>
</select></td>
</tr>
<tr style="">
<td ><div id="statediv"><select name="state" >
<option>Select Category First</option>
</select></div></td>
</tr>
<tr style="">
<td ><div id="citydiv"><select name="city">
<option>Select Country First</option>
</select></div></td>
</tr>
<tr>
<td><label>
<input type="submit" name="submit" id="submit" value="Submit">
</label></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
No comments posted yet
Your Answer:
Login to answer
202
18
Other forums
Check something, wait, check again, do something!
Hi guys.
I wonder if someone can help me with this.
Basically, what I want to do is (
present value of sequence?
Hi
Please help me to find out the present value of sequence?
Thanks
Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_
EU VAT Package 2010
Does any one know whether SAP will be developing new reporting functionality due the new VAT rules t
HTAccess auto log in?
Hi all.
Too busy driving celebs about lately so I hope someone here can help me out.
I
Xml parsing
I need a suggestion about parsing xml with multiply parts like pervious...
i.e. different device
PHP hyperlinks generator - HELP plz
Hi
I need some help to get this done using php:
1 - I have few hyperlinks say 500
need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for
Onclick problem in Firefox
Hi,
I am using a . It doesn't seem to
Buggy registration system
Hey, I just started scripting in PHP, and I ran into a few problems.
Code: <?php
includ