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)) {
}
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
quick question
Hi ..
i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a
Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,
I have a script with some options.
I use regex to replace patterns in strings, but
How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them
Request for tunning the below query
Hi,
Can any one help me on the below query while improving the performance,
Login page problems
I developed a website a few months ago and I am now having an issue with logging into it. The place
Apple's revamped lineup arrives
I'm personally curious about the magic mouse.. a multi-touch concept sounds like it could be nea
generate seo frienly url from a text like wordpress
Convert: "åäö" to "aao", "space" to "-", "!?&q
generating random codes
Hi guys n gals,
I have a requirement to generate 250,000 unique codes...
These codes a
that old Malformed Headers problem again!!!!! HELP!!!!!!
I've read the http://www.phpfreaks.com/forums/index.php/topic,37442.0.html
I don't think my c
Why does my crawler script suddenly end with no error?
Hi.
I have written a web crawler script. It will visit a large number of URL's with cURL.