Forum Moderators: coopster

Message Too Old, No Replies

Need forms to auto-fill one field -How?

Autofill a web form based on previous page

         

ricksterv4n1x8

11:42 pm on Jan 15, 2006 (gmt 0)

10+ Year Member



I have a support request form on my site that has a product field in it. Visitors get to this form by first looking at a particualr product then clicking the support button. I want the support form to autofill the product field based on what directory they are arriving at the support page from. Is this possible or easy enough for a newbie like me to do? Any suggestions? Thanks

phparion

4:45 am on Jan 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



u can use two ways to get the page add where they came from to track product

$_REQUEST[URI];
$_SERVER['HTTP_REFERRER'];

play around with them u will get it done,

coopster

3:20 pm on Jan 16, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, ricksterv4n1x8.

I think phparion meant for that first superglobal to be

$_SERVER['REQUEST_URI']

ricksterv4n1x8

4:02 pm on Jan 16, 2006 (gmt 0)

10+ Year Member



Thanks. I'm not sure though what to do with this information. Like, where does it fit within a standard html form? And also, how do I relate the previous page with a particular field (like "Product 1", "Product 2", etc.)

Thanks

phparion

8:02 pm on Jan 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



oh sorry i miswrote that variable anyway pls post your code here then i will help you to accomplish this task,