Well what I want to do is when someone types something into a field it changes something else in say a text box.
For example I have a sentence and it begins " My name is 'X''
Then I have a field where they type in there name and either live or they click a button and it changes the sentence. How would I do this?
Thank you.
Form to create
Re: Form to create
just using $_POST['name'] you could do
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> <div> <?php if (isset($_POST['name'])){ echo "Your name is ", htmlentities($_POST['name']); } ?> <form action="" method="post"> <p> <input type="text" name="name" /> <input type="submit" value="Update" /> </p> </form> </div> </body> </html>
Re: Form to create
To do it live, you must use javascript. PHP is not for client-side stuff.