I changed the form method to "GET" and then tried doing this to save the file:
at the top of the page I have:
<?php
global $lastName;
ob_start();
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
THEN THE PAGE GOES HERE
At the bottom of the page I Have:
<?php
$content = ob_get_flush();
$file_to_save = "http://www.ootaclan.org/Brent_Industries/applications/" . $lastName . ".txt";
$return = file_put_contents($file_to_save, $content);
if($return == false){
die('Failed to write file!');
}
?>
However it returns this error:
Warning: file_put_contents(http://www.ootaclan.org/Brent_Industries/applications/File.txt) [function.file-put-contents]: failed to open stream: HTTP wrapper does not support writeable connections. in /home/ootaclan/public_html/Brent_Industries/employee_application.php on line 544
Failed to write file!
I've used this method in the past one time, but i've never recieved this error.