Jump to content

Display Text From Text Field


manu0701
 Share

Recommended Posts

You can adapt the information in this thread:http://w3schools.invisionzone.com/index.php?showtopic=12509The post about logging in and using the session has what you need. That's built to use a database in the example, but you can leave out the registration portion, you can leave out the database checking in the login portion, and it will show you how to set something in the session (like a username), and print it on another page.If you have questions about that PHP code, post your questions in the PHP forum here.

Link to comment
Share on other sites

i want to have a text field where a user types his/her name into, then once they click ok i want their name to appear at the top of the page saying Welcome (name)!
<html><head><script>function getit(){ name='Hello, '+document.box.pwd.value; document.getElementById('here').innerHTML=name;}</script></head><body><form name="box"><div id="here"><input type=text name=pwd value="Your Name"><input type=button value="Submit" onclick="getit();"></div></form></body></html>

Is this what you mean? I have fallen in love with <div id> and document.getElementById...!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...