Form Redirect

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Post by Joan Garnet » Fri Jan 10, 2003 1:06 pm

I would do it like this:
The form:

Code: Select all

<form name="form1" method="post" action="SomeSite.php">
<input type="text" name="name" value="Joan">
<input type="submit">
</form>


SomeSite.php:

Code: Select all

echo $HTTP_POST_VARS["name"];//outputs Joan


This is the basics, then you can use it as you want.
bye!

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

Post by Joan Garnet » Fri Jan 10, 2003 3:28 pm

Well, this is exactly what you are doing.
You are sending the POST data in a header and the script will have to deal with those variables.

The script in the middle could have a javascript onload function, so users don't need to press any buttons.

You can do whatever you want with those vars.
Obviusly you'll need to know how the script (where you are sending those vars) works.

If you post something concrete maybe we'll give you a more appropiate answer.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest