Jump to content

[SOLVED] Help with a simple /get ? input


pixelninja

Recommended Posts

I dont even know where to begin or what you would call this type of thing...

 

I was wanting to make something simple where the user would type in a name and when they submitted it would simply bring them to a URL with the name they submitted in a certain spot..

 

example: user inputs pixelninja into the input field and when they click submit it would go to http://google.com/somethinghere.pixelninja where it would simply add pixelninja to the certain spot in the URL.. Does this make sense I have seen it before Im sure its simple to do but i cant seem to get it.

 

Thanks for any help

Link to comment
https://forums.phpfreaks.com/topic/107555-solved-help-with-a-simple-get-input/
Share on other sites

Put this at the top of your form, and have the action be the URL of the form itself:

 

<?php
if(isset($_POST['submit'])) {
$url = "http://www.whatever.com/folder/thingy/" . $_POST['url'] . "/morefolders/";
Header("Location: $url");
?>

 

Obviously make sure you edit the POST variables to the correct names ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.