Reply to Re: return values

Your name:

Reply:


Posted by Rik on 10/24/06 04:10

kirke wrote:
> Thx Rik.
>
> B, C, D are different pages. Then How can I set it?
> Hidden doesn't work at all.


Hidden should work, with added security risk of users changing the value in
between.
If the data is not vital/not a potential risk, you can set it by adding a
hidden value to the form, named whatever you like, and make sure the only
way the user comes to C (or D) is by the same form that holds that hidden
input.

If that doesn't work for you, you either have a flaw in your PHP or your
HTML. print_r($_POST) to see what you received on the request.

Also a possibility (that I wouldn't recommend, but it's possible) is to set
a GET value in the action of the form.

On bigger/more secure scripts, usually sessions are used.
Add session_start() to your script (BEFORE any output, even a space will
make it impossible to use), and then assign your value like
$_SESSION['name_of_variable'] = $var;

On a succesfull session_start() on the other pages, the value will now be
available.
--
Grtz,

Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация