faqts : Computers : Programming : Languages : PHP : Common Problems : Forms and User Input : URLs and Post or Get Methods

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 11 people (36%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How can you submit text in a form and have it automatically posted to the site?

Dec 25th, 2005 13:49
Shubhankar Banerjee, General Goldphish, Monkey,


Try something along the lines of:
<?php
$foo=$_GET[foo];
echo $foo;
<form action="whateverpage.php" method="get">
Foo: <input type="text" name="foo">
<input type="submit" name="submit" value="submit">
</form>
?>
If the target site is your own site, a better and foolproof method 
would be to design a SQL database, to collect the data and you may post 
th econtents on your site dynamically (using a simple PHP dbconnect())