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
A little help in c#
i am doing a simple paint program using c# i want to draw with the mouse so i wrote the code of the
Deleting Partners on the Customer Master.
Does SAP handle removing the Partner from Open Sales Orders when a Partner is deleted in the Custome
Filling gaps in dates
So i'm doing a query for sales data and my return array looks like this
('date' => '20
C problem struct and string
Hi guys,
This is my first post and I'm hoping the experts here can help me solve my problem.<
Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup fo
Multithreading in Oracle (Java, SQLJ, Pro*C,??) on 10g
I am investigating how to run a Java stored procedure in multithread mode.
I know that if I chang
Check premium expire
Hi,
I am making a simple file hosting site and want to check if users premium subscriptions h
Beginner question regarding Array's
Hi everyone, the page im working on has an array of variable at the top...
Code: $define_li
losing session vars when arriving from an email link
Hi,
I've got a confirmation script made that sends an email with a link for a user to confirm
The page should be expire when cilck back button
hi,
i'm new to php world.
i create user registration page.
when i submit it,data goes to my