Hi,

It is kind of difficult to explain what I am trying to do here, I will provide the form here to give a better idea.

<ul>
                        <li>Select the type of your starting point of interest:<br/>
                                <div id="start_menu"><form action="test_getrss.php" name="form1" method="post">
                                        <span><input type="radio" value="Apartment" name="start"
                                                onclick="check(document.form1.start)"/> Apartment </span>
                                        <span><input type="radio" value="Grocery" name="start"
                                                onclick="check(document.form1.start)"/> Grocery </span>
                                        <span><input type="radio" value="Drugstore" name="start"
                                                onclick="check(document.form1.start)"/> Drug Store </span>                                              
                                </form></div></li>
                        <li>Select the type of your ending point of interest:<br/>
                                <div id="end_menu"><form action="test_getrss2.php" name="form2" method="post">
                                        <span><input type="radio" value="Apartment" name="end"
                                                onclick="check2(document.form2.end)"/> Apartment </span>
                                        <span><input type="radio" value="Grocery" name="end"
                                                onclick="check2(document.form2.end)"/> Grocery </span>
                                        <span><input type="radio" value="Drugstore" name="end"
                                                onclick="check2(document.form2.end)"/> Drug Store </span>                                                                                                                      
                                </form></div></li>
                           <form action="process.php" method="post">
                        <li>Start Time: <input type="text" size="12" name="start_time"/></li>
                        <li>Arrive Time: <input type="text" size="12" name="end_time"/></li>
                        <li>Which Semster is this: <select name="semester">
                                <option value="Fall">Fall</option>
                                <option value="Spring">Spring</option>
                                <option value="Summer">Summer</option>                               
                        </select><br/></li>
                        <input type="hidden" name="form1" value="<?php echo $start?>"/>
                                <input type="hidden" name="form2" value="<?php echo $end?>"/>
                        <li style="list-style:none"><input type="submit" value="Submit" name="submit"/>
                        <input type="reset" value="Reset" name="reset"/></form></li>                                              
                </ul>

For some reason, when I pass in the output with process.php, the hidden input does not get passed in. Here is the process.php:

$start_time = $_POST['start_time'];
$end_time = $_POST['end_time'];
$semester = $_POST['semester'];
$form1 = $_POST['form1'];
$form2 = $_POST['form2'];

echo "Start Time " . $start_time . "<br />";
echo "End Time " . $end_time . "<br />";
echo "Semester " . $semester . "<br />";
echo "Start Location " . $form1 . "<br />";
echo "End Location " . $form2 . "<br />";

I get values for start_time, end_time and semester, but not the last two values. I noticed that the first two forms here are dynamically generated from Ajax.

How can I pass the values of these two selected menus to the third form, to process.php so the values can be retrieved?

Thanks for your help.

>> Line 28 and 29 - When this page is shown, are you sure they even got values? First check the HTML source code and if that doesn't show that there is nothing, perhaps write a function that alerts the values when the form is submitted using javascript.

~G

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.