PDA

View Full Version : Question regarding Forms


karatekid
01-17-2006, 01:17 PM
Hi, i was wondering if anyone could help me with a problem regarding Forms.
I have created a simple form and a submit button, i just wanted to know if it is possible, when the form has been completed and the submit button has been pressed, to copy all the information entered to another page(like a confirmation page) on my site.I have tried using the code below, but when the submit button is clicked,it just brings me to a blank test_page.html.
ManyThanks

'<form name="input" action="test_page.html"
method="get">
Username:
<input type="text" name="name1">
<input type="submit" value="Submit">
</form> '

Vege
01-17-2006, 01:37 PM
Server side language is needed to parse the sent input.
In PHP it would be like:

<form name="input" action="test_page.php" method="get">
Username:
<input type="text" name="name1">
<input type="submit" value="Submit">
</form>

other file named test_page.php
<?php
echo $_GET['name1'];
?>

karatekid
01-17-2006, 01:58 PM
hi,thanks for the quick reply
I was just wondering if there is anything similar i can do, which i can use html or java script, as i have to upload this on my schools server, and im not sure if they have php installed

Vege
01-17-2006, 03:19 PM
with html and javascript, no