Re: Create Links on the fly?
| From: | Bobby Patel | Date: | Wed, 28 May 2003 17:32:21 +0000 |
| Subject: | Re: Create Links on the fly? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149298@lists.php.net to get a copy of this message | ||
###HTML snippet
<form action = "redirect.php">
Enter Number : <input type=text name="number">
</form>
###PHP
<?php
$number = $HTTP_POST_VARS['number']; # or $_POST['number']; depnding on PHP
version
header ("Location: http://www.mypage.com/".$number);
exit();
?>
### NOTE: I just wrote this on the fly so there is no error checking or
sytnax checking
#### Hopefully this makes sense and doesn;t need explanations, but if so
just post the list and me and I'll get back to you.
Bobby
"Chase" <chase@graewolfe.com> wrote in message
news:20030528172028.35227.qmail@pb1.pair.com...
> Salutations!
>
> I am trying to do something fairly simple, but I can't seem to make it
> work... I want to have a form field on a page that the user will put in a
3
> to 5 digit number and when they click on "Submit" that number will become
> part of an URL that they are forwarded to.
>
> For example, if the user put in the number 123, then when they click on
> "Submit" they would be pushed to
> http://www.mypage.com/123.
>
> Can anyone offer help??
>
>