A simple PHP Question
hey guys,
learning basic php make simple form, , have quick question. have these 2 test php files, form.php , acion.php. enter in on form posted via $_post action.php gets displayed. here test sites:
http://christianstest.info/phptest/form.php
http://christianstest.info/phptest/action.php
and code two, verry simple:
form.php
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>php form test</title> </head> <body> <form action="action.php" method="post"> <p>your name: <input type="text" name="name" /></p> <p>your age: <input type="text" name="age" /></p> <p><input type="submit" /></p> </form> </body> </html>
and action.php
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>untitled document</title> </head> <body> hi <?php echo htmlspecialchars($_post['name']); ?>. <?php echo (int)$_post['age']; ?> years old. </body> </html>
now want have action.php store data entered form.php link directly action.php , see whatever last user entered form.php. of right now, if go directly uncached action.php displays nothing name , age respectivly. how can data stick? if in fact not simple question, can point me tutorial? thanks!
you'll want repost topic in dreamweaver forum:
http://forums.adobe.com/community/dreamweaver?view=discussions
take care, mike
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment