Forums

This topic is locked

DMX + PHP FORM INFO

Posted 08 Jul 2002 11:36:02
1
has voted
08 Jul 2002 11:36:02 ian hempsell posted:
Hi guys.

I'm new to PHP and I am trying to pass on the variables (content) of a form from one page to the next. (I have the same form on each page but I want the user to be able to refine their search without having to key in all the info again.)

Could anyone point me in the right direction?

Regards Ian.

Replies

Replied 10 Jul 2002 10:24:46
10 Jul 2002 10:24:46 Tim Green replied:
This isn't actually as difficult as it sounds. If you have a single form field (for the sake of argument, let's call it searchField), then all you have to do is to change the field to look like this:-

<input type="text" name="searchField" value="<?php echo $_POST["searchField"]; ?>">

This will ensure that the value is always put into the field, should there have been a value on previous pages.

I think this is what you hoped to achieve, but let us know if you wanted to do something different.


Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic