Ok, with a little help from Chase. I got there in the end.
http://www.jamie-barton.com/getphp/form.php-----------------------------------------------------------------------------------------------------
Step 1Create new php document, name it
connect.phpEnter the following:
CODE
<?
$dbh=mysql_connect ("localhost", "jamie_test", "test") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("jamie_test");
?>
Thats connect done, replace jamie_test with your database name & user, also change the password too.
Step 2Create new php document, name it
form.phpUse the following, you may want to modify this to have more fields etc.
CODE
<?
echo '
<form method=POST action=submit.php name="newform">
<textarea rows="10" cols="30" name="contents">
Enter your article here</textarea>
<input type=submit value="Submit Info"><br>
</form>
';
?>
Step 3Create new php document, name it
submit.phpUse the following code:
CODE
<?php
include("connect.php");
mysql_query("UPDATE test SET
contents='$contents' WHERE ID='1' LIMIT 1");
echo('<center><font size=3>Thank you, data sent to Database</font>
<META HTTP-EQUIV="refresh" content="1; URL=http://www.url/folder/index.php">
');
?>
Rename:
CODE
http://www.url/folder/index.php
To whatever meets your specification.
Step 4Create new php document, name it
index.phpInsert the following code into index.php
CODE
<table width="201" border="0">
 <tr>
  <td width="82"><strong>Data</strong></td>
  <td width="500"><?php
include('connect.php');
$result = mysql_query("SELECT * FROM test");
while ( $row = mysql_fetch_array($result)) {
echo($row['contents']);
}
?> </td>
 </tr>
</table>
Above, i have
contents &
test. test is the name of my table in the database & contents is the name of the field.
In order to do this, go to your MyPhpAdmin & setup a new database, name the database whatever you want (
note: Remember to change your field name and table name in all the files above also.)
Its very simple, that should be it complete!
Preview:
http://www.jamie-barton.com/getphp/form.phpHave fun,
Regards,
Jamie