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
Word filter problem
Hello,
im trying to make a filter for words inputted in to my website but i want to store the
Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu
selectbox+database connection retrive problem
Code: [Select]
<tr>
<th align="left" scope="c
bit of help needed
Im about to sort out my registration page for my website by customising a "registration" s
Print 'a' to 'z' via for loop
A very simple problem..
How Can I print a to z NOT a to y ?
It is a part of a code where
<
GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.
I have a
Confused with Loop
guys, i got confused with Looping...this is the case
I have 3 stocks, let say "Stock A&q
understanding functions and classes
Code: [Select]
class person {
var $name = "Jimmy Goe";
function get_nam
Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other
help with contest script
I would like to code a contest script to my site but i don't know how. Could someone just give me pu