Hello Jimmy,
Thanks a million. It worked perfectly. You made my day.
Just a very last question. I forgot to add a page (page.php) in the attachment on the previous post.
On the page.php, I have hand coded a php switch condition statement and I have a form below to integrate the switch statement. In the form there are 3 radio buttons representing Pages i e
radio button1 = page1.php
radio button2= page2.php
radio button3 =page3.php
When a user select say, radio button1 and complete the rest of the form fields and then clicks on the submit button, the user is redirected to page1.php
Similarly selecting radio button2 and complete the other form elements in the form and then clicks on submit button, the user is redirect to page2.php. I know I need to add a custom code on the form action, any help on how to achive this? See attachment for details
<?php
session start()
switch(#{destination}) {
case "1" :
header("Location: page1.php");
break;
case "2 ":
header("Location: page2.php");
break;
case "3 ":
header("Location: page3.php");
break;
}
exit();
?>
<form id="form1" method="post" action=" ">
<table width="403" border="0">
<tr>
<td width="104"><p>
<label>
<input type="radio" name="select" value="p1" id="select_0" />
Page 1</label>
<br />
<label>
<input type="radio" name="select" value="p2" id="select_1" />
Page 2</label>
<br />
<label>
<input type="radio" name="select" value="p3" id="select_2" />
Page3</label>
<br />
</p></td>
<td width="144"> </td>
<td width="141"><?php
if (ValidatedField('page1_214','page1_214')) {
if ((strpos((",".ValidatedField("page1_214","page1_214").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<font color="#FF0000">Select one</font>
<?php //WAFV_Conditional page1.php page1_214(1:)
}
}
}?></td>
</tr>
<tr>
<td>Arrival Date</td>
<td><label>
<input name="ArrivalDate" type="text" id="ArrivalDate" size="10" />
</label></td>
<td><?php
if (ValidatedField('page1_214','page1_214')) {
if ((strpos((",".ValidatedField("page1_214","page1_214").","), "," . "2" . ",") !== false || "2" == "")) {
if (!(false)) {
?>
<font color="#FF0000">Pick Date</font>
<?php //WAFV_Conditional page1.php page1_214(2:)
}
}
}?></td>
</tr>
<tr>
<td>Arrival Time</td>
<td><label>
<input type="text" name="ArrivalTime" id="ArrivalTime" />
</label></td>
<td><?php
if (ValidatedField('page1_214','page1_214')) {
if ((strpos((",".ValidatedField("page1_214","page1_214").","), "," . "3" . ",") !== false || "3" == "")) {
if (!(false)) {
?>
<font color="#FF0000">Time is required</font>
<?php //WAFV_Conditional page1.php page1_214(3:)
}
}
}?></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td><label>
<input type="submit" name="submit" id="submit" value=">>> Continue" />
</label></td>
</tr>
</table>
<p> </p>
<p> </p>
</form>
Thanks alot for the help