Aslam U Alaikum,
mr. valentin, the solution to your problem is very simple. The selected
value of location is posted from script1.php to script2.php and is now
available in script2.php. Simply put this value in some hidden field in
script2.php and submit the form to script1.php, so the value is available again
in script1.php.
e.g. the hidden field in script2.php has the name "loc" then write your
<options> in the <select> as:
<option <? if($_POST['loc'] == 'us') print "selected"; ?>>US</option>
<option <? if($_POST['loc'] == 'it') print "selected"; ?>>IT</option>
<option <? if($_POST['loc'] == 'other') print "selected"; ?>>Other</option>
and so on for each option
i think that will solve your problem.
Allah Hafiz
valentin <[EMAIL PROTECTED]> wrote:
Hello there :)
First of all Merry Christmas and A Happy New Year.
My problem is the following one:
a have script1.php where i have a select field, and the visitor should choose
a value;
let's say the field is called value, the default value is Location, the first
choice US, second FR, 3rd IT; if the user do not choose a location the same
script will print just aboce the Location field an error message; if the
visitor choose a location the script2.php will echo e message "You live in
$location";
Now my question: if the visitor goes back from script2.php to script1.php how
is it possible to reload the selected value?
Thanks.
---------------------------------
Yahoo! for Good - Make a difference this year.
[Non-text portions of this message have been removed]
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
SPONSORED LINKS
American general life and accident insurance company American general
life insurance company American general life American general mortgage
American general life insurance Computer internet security
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "php_mysql" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays,
whatever.
[Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/CefplB/TM
--------------------------------------------------------------------~->
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/