Get variable from URL problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
DNihilist
Forum Newbie
Posts: 3
Joined: Mon Sep 15, 2008 11:18 am

Get variable from URL problem

Post by DNihilist »

Hi guys. I'm new here. I checked around and can't find anyone else with this problem. So here goes.

I want to pull a variable from the URL and have that posted in a form.

ie http://mysite.com/incoming.php?link=http://google.com

I have tried it with the $_REQUEST function but all that does is put the variable in the text input. It does not post it and thus I have to hit the submit button myself.

Here is an example of the code I am working with.

Code: Select all

<form name="form1" method="post" action="http://mysitecom/result.php">
<input name="link" type="text" size="50" value="<?php echo $_REQUEST['link']; ?>">
<input type="submit" name="send" value="Submit">                
<input type="hidden" name="submitted" value="TRUE">
</form>
ahowell
Forum Newbie
Posts: 17
Joined: Mon Sep 01, 2008 9:18 pm

Re: Get variable from URL problem

Post by ahowell »

PHP won't automatically post a form for you. You'll need to use javascript.
Last edited by ahowell on Mon Sep 15, 2008 12:21 pm, edited 1 time in total.
DNihilist
Forum Newbie
Posts: 3
Joined: Mon Sep 15, 2008 11:18 am

Re: Get variable from URL problem

Post by DNihilist »

would you mind helping me further with that?
DNihilist
Forum Newbie
Posts: 3
Joined: Mon Sep 15, 2008 11:18 am

Re: Get variable from URL problem

Post by DNihilist »

Post Reply