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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 10-29-2007, 04:51 PM   #1
Phil
Confirmed User
 
Phil's Avatar
 
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
Phil is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2007, 05:02 PM   #2
dissipate
The Dirty Frenchman
 
dissipate's Avatar
 
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
echo $_POST['formvariablename'];
dissipate is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2007, 05:04 PM   #3
Tempest
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>
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2007, 05:28 PM   #4
Phil
Confirmed User
 
Phil's Avatar
 
Join Date: Jan 2004
Posts: 7,659
thank you. works great
__________________
Ask Phil
Phil is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 10-29-2007, 05:53 PM   #5
quantum-x
Confirmed User
 
quantum-x's Avatar
 
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
Don't trust htmlentities.
quantum-x is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.