Jump to content

PHP get url from form


spears47

Recommended Posts

Hello, I would appreciate if somebody could help me solve my problem

 

I have a form that posts to a php. what i want to do is from that form not get directed to the php but simply grab the url of where it goes. is this possible? for example

 

I hit submit on the form it POSTs to target.php where target.php then sends me to end.php

 

is there a way i can just grab the url from end.php without getting redirected?

Link to comment
Share on other sites

I'm probably going to need to see a little coding example as I'm not 100% sure on what you are looking for.  I can tell you that likely you want your form to "post" to one .php page but actually "go" to another??

 

If that is the case then try php curl to post something "in the background" or combine the pages together via an include statement.

Link to comment
Share on other sites

Okay thanks.  Here is the starting point

 

<html>
<form action='login_user.php' method='post'>
<input type="hidden" name="action" value="001" />
<input type="hidden" name="serverid" value="" />
USERNAME<input type='text' name='value1' size='20' maxlength='20'/>
PASSWORD<input type="password" name="value2" size="20" maxlength="32"/>
<input type="submit" value="login" name="login"/>
</form>
</html>

 

From there it goes to login_user.php with the post.  login_user.php then redirects to the account info page

 

What i want is the url from the account info page. is that possible?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.