Hvad har jeg lavet forkert ved min GET
Hej jeg får ikke indholdet af mit textarea men GET<?php
if ($_GET['save'] != "go"){
}else{
$filename = 'me.php';
$somecontent = $_GET[textsave];
// 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 ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($somecontent) to file ($filename)";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
}
?>
<textarea name="textsave" style="border:0px; background:#CCCCCC;" rows="32" cols="71">
<?php print htmlspecialchars(file_get_contents("me.php"));?>
</textarea>
