Re: variables are empty when a script recalls itself ($PHP_SELF)

From: Date: Tue, 09 Oct 2001 04:05:58 +0000
Subject: Re: variables are empty when a script recalls itself ($PHP_SELF)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-70415@lists.php.net to get a copy of this message
try hidden fields in the FORM <INPUT TYPE=HIDDEN NAME=some_name VALUE=$some_name> ----- Original Message ----- From: Steve Werby <steve-lists@befriend.com> To: <php-general@lists.php.net>; <php-db@lists.php.net>; Sander Peters <S.Peters@Visionnet.nl> Sent: Monday, October 08, 2001 5:06 PM Subject: Re: [PHP] variables are empty when a script recalls itself ($PHP_SELF) > "Sander Peters" <S.Peters@Visionnet.nl> wrote: > > I have the following problem (maybe you know the sollution) > > > > I have a form wich the user can fill up to view certain records in a > > database. > > > > The query is like this > > > > $query_string = "SELECT ID, medianr, date, cat, subcat, titel, descr, > > nrmedia, > > video from movies where 1 and video like \"$video\" and titel like > > \"$titel\" > > LIMIT 0, $nr "; > > > > all those variables come straight from the form. > > The user can also decide how much records he/she wants to see so there's > > also > > a prev/next mechanism in the script. > > The prev/next links have a php_self link so the script calls itself > > again but > > then with a higher limit (offset) value. > > > > But the big problem is: > > > > all the values from ($titel, $nr, etc) the form are empty! > > > > Is there a way to keep those values when the script recalls himself? > > Add the key/value pairs (variables and their values) to the query string in > the prev/next links. As an alternative you can use session variables, but I > recommend getting a handle on the easier solution first. > > -- > Steve Werby > President, Befriend Internet Services LLC > http://www.befriend.com/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#70415) next »