On Sunday 16 February 2003 09:21, Geckodeep wrote:

> My html looks ok.

Are you sure?

> The TEXT variable is $catname and the $rubriqueid is a mistake it is
> actually $catid but it is not that giving the problem. It is an error from
> my part when I posted it.

How are you passing $catname onto the next page? I presume via the hidden 
input element? AFAICS from your code (and you can spot this straight away 
from the HTML source) you only have a hidden input element for the last value 
of $catname retrieved from the DB. Thus you need to move them inside the 
while-loop. However your hidden input elements are all named 'hidden' which 
isn't very helpful -- give them unique names. 

The real question is why /are/ you passing $catname to the next page? $catid 
is the unique identifier so why do you need $catname on the next page? You 
can always lookup $catname from the DB on the next page if you need it. If 
you don't want to look it up again then I suggest putting both $catid and 
$catname into the option value ...

  <option value='$catid|$catname'>$catname</option>

... then extract the two parts on the following page.

Depending on what characters gets stored in $catname you may need to run it 
through htmlspecialchars().

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Q:      How did you get into artificial intelligence?
A:      Seemed logical -- I didn't have any real intelligence.
*/


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

Reply via email to