Computer Hope
Internet & Networking => Web design => Topic started by: Bannana97 on December 07, 2008, 11:05:03 AM
-
For example:
I type:
Username: Bannana97
Password: XXXXXXXX
Email: [email protected]
SUBMIT
How do I make the submit button go to another link WHILE carrying the information to another spot.
Another example:
I type for my new website:
Name: ClubBannana97
URL: http://www.clubbannana97.com/
SUBMIT
How do I make it go to a page where it says this:
You have just created a website!</br>
website information:
Name: The Name I entered
URL: the URL I entered
????????????????????
-
You would need to use PHP or ASP for that.
Try the following:
Page 1, where you enter the information:
<?php
echo "
<html>
<head>
<title>My Website</title>
</head>
<body>
<form action='page2.php' method='post'>
Name: <input type='text' name='name' id='name' />
URL: <input type='text' name='url' id='url' />
<input type='submit' value='Submit' />
</form>
</body>
</html>";
?>
And for "page2.php":
<?php
$name = $_REQUEST['name'];
$url = $_REQUEST['url'];
echo "<html>
<head>
<title>Page 2</title>
</head>
<body>
<b>You have just created a website!</b><br />
Website information:<br />
Name: " . $name . "<br />
URL: " . $url . "
</body>
</html>";
?>
That should work.... ;)
-
You don't exactly need a server side scripting language for this, if the server the user is using doesn't provide that functionality, they could always use HTML and Javascript...
Take a look > Here < (http://www.computerhope.com/forum/index.php/topic,33607.msg202969.html), that should help.
-
Yes, but nearly all servers now support PHP or ASP so that won't be a problem.
-
You are right about that, I was just merely saying that if the user's web server did not support any server side scripting languages, than it would still be possible. And you can also use ASP.NET, CFM, JSP, Tcl, Perl, or Python as well, if the web server supports them...
-
Take a look > Here < (http://www.computerhope.com/forum/index.php/topic,33607.msg202969.html), that should help.
I missed that. Very interesting. :)