MPCODER
01-17-2004, 07:15 PM
Hi,
I've made a script which logs some information the quest has typed in a .txt file.
Here is the code im using:
This is what you posted: <br>
Username: <?php echo $_POST["name"]; ?>. <br>
Desired Password: <?php echo $_POST["password"]; ?> <br>
Email Adress: <?php echo $_POST["email"]; ?> <br>
Portfolio Site: <?php echo $_POST["site"]; ?><br>
<br>
If this is invalid, please contact me, phpengine@hotmail.com <br>
This script will be on PHPEngine later. At the moment i only wrote it for job
requests.
<?php
$file = "jobs.txt"
$username = $_POST["name"];
$password = $_POST["password"];
$email = $_POST["email"];
$site = $_POST["site"];
if(is_writable($file)){
$open = fopen($file,"a");
fwrite($open,$username);
fwrite($open,$password);
fwrite($open,$email);
fwrite($open,$site);
fclose($open);
}else{
chmod($file,0777) or die("Attempted to chmod the file, it was unsuccessful, please chmod ".$file." to 0777 yourself");
echo 'File was unwritable. Please refresh the page to try again';
}
?>
I've made a script which logs some information the quest has typed in a .txt file.
Here is the code im using:
This is what you posted: <br>
Username: <?php echo $_POST["name"]; ?>. <br>
Desired Password: <?php echo $_POST["password"]; ?> <br>
Email Adress: <?php echo $_POST["email"]; ?> <br>
Portfolio Site: <?php echo $_POST["site"]; ?><br>
<br>
If this is invalid, please contact me, phpengine@hotmail.com <br>
This script will be on PHPEngine later. At the moment i only wrote it for job
requests.
<?php
$file = "jobs.txt"
$username = $_POST["name"];
$password = $_POST["password"];
$email = $_POST["email"];
$site = $_POST["site"];
if(is_writable($file)){
$open = fopen($file,"a");
fwrite($open,$username);
fwrite($open,$password);
fwrite($open,$email);
fwrite($open,$site);
fclose($open);
}else{
chmod($file,0777) or die("Attempted to chmod the file, it was unsuccessful, please chmod ".$file." to 0777 yourself");
echo 'File was unwritable. Please refresh the page to try again';
}
?>