Hi Jason Man you are great, well indeed I stumbled on my stupidity by putting the hidden name instead of making it unique I've rectified it.
The reason for passing this variable to the next page is the cats table is only needed in the first form and the name of the cat is just printed on the following page untill the final result page. I could have looked it up again on the table on my next form part but thinking of saving the resource I thought of going for the option of passing the variable. Well I managed to do by passing the variable enclosing it in the Php tag like this soloution found on the Forum: <input type="hidden" name="catname" value = "<?echo $catname ; ?>"> at least t is getting transferred but I have the problem like you mentioned, it is only showing the last element on the table no matter what is selected on the drop down menu. I didn't know that I could pass two values together inside the option tag like you've shown <option value='$catid|$catname'>. If I choose this would I need to do a while loop to get the catname or will it find it along the catid. Let me try without the while loop. Thanks again Jason. gd "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > 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