![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jan 2004
Posts: 7,659
|
need help with PHP. Who do you pass variable through text field.
page_one.php where I have text field for user to enter text..
form action page_one.php where I echo their text. Im having brain fat and can't think
__________________
Ask Phil |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
The Dirty Frenchman
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
|
echo $_POST['formvariablename'];
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
|
Not sure if this is the type of thing you're looking for or not... "should" work but I didn't test it.
Code:
<html>...... <form action="page_one.php" method="POST"> <p><input type="text" name="sometext" value="" size="30" /></p> <p><input type="submit" name="subbutton" value="Submit It" /></p> </form><br /> <?php if(isset($_POST['subbutton']) && isset($_POST['sometext']) && trim($_POST['sometext']) != ''){ echo("<p>".htmlentities($_POST['sometext'])."</p>\n"); } ?> ..... </html> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Don't trust htmlentities.
|
![]() |
![]() ![]() ![]() ![]() ![]() |