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
help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when
Help With editting and deleting form
Hallo !!
So look at this image :
http://img194.imageshack.us/img194/8272/snapshot5f.pn
Simple PHP/Java Help..
Hi,
I'm trying to build a little program to do with calculating postage. Unfortunately i haven't
Pop-up Banner
Hello Friends,I need to use banner in our client site.Example: www.example.com if i enter this site
Convert array to string and write to csv file
I am looking to write a MySQL query to a csv file.
At the minute I:
check for the orig
On page view, minus credit
Hello all, please, I need a little help with this script. I am charging one credit (credits can be p
Undefined Variable: PHP_SELF, pls help
Hi,
Im a newbie on PHP / MySQL programming and Im running a script to search one field on my
Socket programming
Hello all,
I have a PHP socket script. GPS trackers connect to this socket. IMEI verification
Any decent php formatter/beautifier/pretty printer?
Any decent php formatter/beautifier/pretty printer class/function?
I found the following whil
Seperate team from score
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the sc