Re: [PHP-DB] Passing selection to next page

2002-12-19 Thread xxx xxxx
Hi,
you have to put this list in a form...





in eval.php you may write like:
$variable1=$_POST['select_name'];
//and variable1 is now the "option_value" selected

echo $variable1;

where "option_value" is the value written in the list...generated by php
if I have a list with 4 values like:
value number one-first
value number two -second
value number three -third
value number four fourth

here the "option_value" is one or two or three or four

so variable1 is now passed from one page to another..

if you have any questions or you are of a different opinion write to me again

cybercop78


On Thu, 19 Dec 2002 11:04:34 -, Alex Francis wrote
> I have a drop down list created using the following code and am 
> having trouble passing my selection to the next page. Can anyone help?
> 
>  $query = "select distinct department from courses order by department";
> $result = mysql_query($query);
> 
> echo "";
> echo "Select Department";
> 
> While ($row = mysql_fetch_assoc($result))
> {
>echo " ";
>echo stripslashes($row["department"]);
>echo "";
> }
> 
> echo "";
> mysql_free_result($result);
> ?>
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php





http://www.idilis.ro - Stiri, e-mail gratuit, download,
SMS, server de counter-strike, hosting gratuit, servicii internet...
Fii cu un pas inaintea celorlati!


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Passing selection to next page

2002-12-19 Thread Snijders, Mark

I guess this all is in a form

so on the next page it should be in:

echo $_POST[department];

or in

echo $department   depending on the php version





-Original Message-
From: Alex Francis [mailto:[EMAIL PROTECTED]]
Sent: donderdag 19 december 2002 12:05
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Passing selection to next page


I have a drop down list created using the following code and am having
trouble passing my selection to the next page. Can anyone help?

";
echo "Select Department";

While ($row = mysql_fetch_assoc($result))
{
   echo " ";
   echo stripslashes($row["department"]);
   echo "";
}

echo "";
mysql_free_result($result);
?>




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php