Ok I might have this all i need is a little tweaking...
OK i got it to work... its really quite neat!
ok so on the HTML Page *or the form page* u put this:
HTML Code:
<!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>
Name
<form method="POST" action="data.php" name="">
Your Name:<input type="text" name="text" value="text" />
Your Name:<input type="text" name="text2" value="text" />
Your Name:<input type="text" name="text3" value="text" />
Your Name:<input type="text" name="text4" value="text" />
<input type="submit" />
</form>
</body>
</html>
Edit it to your standards
Then put this into the Data.php page:
PHP Code:
<?php
$var = $_POST["text"];
$var2 = $_POST["text2"];
$var3 = $_POST["text3"];
$var4 = $_POST["text4"];
echo "Please Fill Out The Form Below"
?>
<?php
$filename = 'data.txt';
$somecontent = "
<br />Your Name: $var
<br />Your EmailAddress: $var2
<br />Your Password: $var3
<br />Your Password: $var4
<br />End of Form";
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
// In our example we're opening $filename in append mode.
// The file pointer is at the bottom of the file hence
// that's where $somecontent will go when we fwrite() it.
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file";
exit;
}
echo "Success, your content to the database)";
fclose($handle);
} else {
echo "The file is not writable";
}
?>
Thats what worked for me! Thanks