Hey everyone. So for example sake I have this:

<title>index.php</title>
<form name="form1">
<select name="useraccounts" id="" value="" onChange="">
<option id="" value="">cant login</option>
<option id="" value="">forgot password/option>
</select>
</form>

<form name="form2">
<select name="computers" id="" value="" onChange="">
<option id="" value="">physically broken</option>
<option id="" value="">needs repair</option>
</select>
</form>

//////////////////////////////////////////

<title>popup.php</title>
<form name="form">
<select name="selection" onChange="">
<option id="" value="">(value of the SELECT name from index.php)</option>
<option id="" value="">(value of the OPTION selected from index.php)</option>
</select>
</form>

I need to get the value of the SELECT name and the value of the OPTION that is selected onto a form on another php page.

I need/would like this to happen as a popup window when the OPTION is selected on either form from index.php. So I'm assuming I'd be using an onChange event.

How can I get these values onto the next page? I don't know much about SESSIONS but I'm assuming this would be the way. The tricky part is that on my page I actually have 8 forms similar to the two above (on index.php) all with different data. Do need to assign them all different values or ids or what?

Any suggestions?

Thanks in advance.

Recommended Answers

All 3 Replies

form action="link to other page "

in the other page value is available as $_POST

form action="link to other page "

in the other page value is available as $_POST

Thanks for the help. But this isn't grabbing the selected <option> and inserting it into my popup.php dynamically.

$_POST Would make me have to retype all the values I have from the index.php page into my popup.php wouldn't it?

Got it working! Thank you for the tip.

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.