Php code to remember drop down selection
Moderator: General Moderators
Php code to remember drop down selection
Hey guys,
I've been trying to find some php code that will remember what selection I made on a drop down box on a previous html page and automatically have it selected on the next page. Im just posting from test.html to test.html but I want the combo selection that I made on the first page to still be selected on the next page after the post...can this even been done with php?
thanks!
I've been trying to find some php code that will remember what selection I made on a drop down box on a previous html page and automatically have it selected on the next page. Im just posting from test.html to test.html but I want the combo selection that I made on the first page to still be selected on the next page after the post...can this even been done with php?
thanks!
-
Crazy Coder
- Forum Newbie
- Posts: 7
- Joined: Thu Dec 14, 2006 8:55 am
yea im not having problems sending the selection info I just want the drop down to be whatever selection i made so i don't have to use the drop down again to select the same item.
Anyone have a sample I can't seem to figure this out and im starting to angry because this doesn't seem that hard hahaha....
Anyone have a sample I can't seem to figure this out and im starting to angry because this doesn't seem that hard hahaha....
-
brendandonhue
- Forum Commoner
- Posts: 71
- Joined: Mon Sep 25, 2006 3:21 pm
- neel_basu
- Forum Contributor
- Posts: 454
- Joined: Wed Dec 06, 2006 9:33 am
- Location: Picnic Garden, Kolkata, India
Save It as Some_filename.html
==============================Save it As rcv.php
=========================
EDIT|OOPS forgot to put </option>
==============================
Code: Select all
.................................................
<form method="GET" action="rcv.php">
<select name="sel">
<option>op1</option>
<option>op2</option>
</select>
<input type="Submit" value="submit">
</form>
................................................=========================
Code: Select all
<?php
echo $_GET['sel'];
?>
Last edited by neel_basu on Tue Jan 02, 2007 12:13 am, edited 1 time in total.