|
||||||
| HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hey all,
I want to have code that will take a user to a site that they specify. For example: John puts 'google' in the input box. The form will then send him to Google. So whatever SITENAME is it goes to www.<whatever it is>.com Any help please? Will I need JavaScript? Code:
<form name="input" action="http://www.SITENAME.com" method="get"> <input type="text" name="SITENAME" value="" size="20"> <input type="submit" value="Submit"> </form> -Beastilio |
| Sponsored Links |
|
|
|
|||||
|
You would need to rename the index.html file to index.php - then assuming your host supports PHP, all you will need to do is copy/paste. I should note, this is also possible to do with JavaScript - but I'm not a huge fan of server side scripting.
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||
|
Thanks again
![]() just ONE last question ![]() I changed the code to Code:
<?php
if(isset($_GET['SITENAME'])) {
header("Location: http://www.{$_GET['SITENAME']}.com");
}
?>
<form name="input" action="index.php" method="get">
<input type="text" name="SITENAME" value="" size="20">
<input type="submit" value="Submit">
</form>
Quote:
-Beastilio |
| Sponsored Links |
|
|
|
|||||
|
I think you mean of client side scripting...
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. |
|
|||||
|
Indeed
![]()
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. | To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Xav | ........ | 1097.16 |
| MeTh0Dz|Reb0rn | ........ | 986.37 |
| morefood2001 | ........ | 850.04 |
| John | ........ | 841.93 |
| WingedPanther | ........ | 684.54 |
| marwex89 | ........ | 638.26 |
| Brandon W | ........ | 492.36 |
| chili5 | ........ | 292.12 |
| orjan | ........ | 187.41 |
| Steve.L | ........ | 183.02 |
Goal: 100,000 Posts
Complete: 79%