I'm looking for a tutorial or script which will let you enter your name in a Form. When you click on the submit button you will be redirected to the next page. The form saves your name (probably with a cookie). On the next page I put in a question and in that question is also the name, which was just filled in by the visitor.
Is there anybody who knows what I mean and where I can find a tutorial or script? Or maybe do you know the words I should search for on Google/P2L?
[Javascript/HTML] Insert name
Started by
Versatile
, Mar 21 2012 02:37 PM
4 replies to this topic
#1
Posted 21 March 2012 - 02:37 PM
- Sweeledualeri and UnuttPeseleme like this
#2
Posted 09 April 2012 - 12:33 PM
Would you be open to doing this in PHP? In my opinion, doing this in PHP is simple and can easily be implemented (also, for me, easier to do that JS)
#3
Posted 11 April 2012 - 01:04 PM
I wouldn't suggest using JS to do this. As Aalicki mentioned, it would be much easier to achieve using PHP. The form would look similar to:
<form method="POST">
<label for="name">Enter your name</label>
<input type="text" name="name" id="name" />
<input type="submit" value="Submit" />
</form>
So once the form is submitted you would output the question as follows:
<p>What is your favourite colour, <?php echo $_POST['name']; ?></p>
Does that make sense?
<form method="POST">
<label for="name">Enter your name</label>
<input type="text" name="name" id="name" />
<input type="submit" value="Submit" />
</form>
So once the form is submitted you would output the question as follows:
<p>What is your favourite colour, <?php echo $_POST['name']; ?></p>
Does that make sense?
#4
Posted 04 November 2012 - 04:18 PM
Hello, JatOffets, it's okay for this time
Maybe you'd like to post in the general discussion forum, we have a topic for those who are new to the forum.
Welcome to Pixel2Life!
Maybe you'd like to post in the general discussion forum, we have a topic for those who are new to the forum.
Welcome to Pixel2Life!
#5
Posted 24 March 2015 - 11:48 AM
Finally i got it! thank you very much for sharing.
Edited by akashbhai, 24 March 2015 - 11:49 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users