Hi,
On my first page I have a simple form:
I want to print on "page2.htm" the value of the firstname.PHP Code:<form action="page2.htm" method="post">
<input type="text" name="firstname" />
<input type="submit" />
</form>
How can I do it?
Hi,
On my first page I have a simple form:
I want to print on "page2.htm" the value of the firstname.PHP Code:<form action="page2.htm" method="post">
<input type="text" name="firstname" />
<input type="submit" />
</form>
How can I do it?
<?php
echo $_POST['firstname'];
?>
and your in the wrong forum
I know how to do it in php but I don't want to use any server-side lagnuage![]()
https://www.google.com/search?q=retr...+in+javascript
Javascript cannot access post data because post data is sent directly to the server and is not part of the next page that loads.
Javascript can access get data in the URL, although it is a little difficult to program (but see some examples in some of the discussions in those search results).
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
That's true-- you could do this using Javascript by not submitting the form. Copy the values of the inputs into variables then hide the form.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks