Jump to content

strip < > brackets


LindaD

Recommended Posts

Can someone please edit this for me to only strip the < > brackets? ???

 

<html> 
<?php 
if ($_POST["text"] == $null || $_POST["file"] == $null){echo'<title>Error!</title>You must at least save something - to leave it blank hit space bar a few times or add periods ...'; exit;} 
$text = $_POST["text"]; 
if (is_writable($_POST["file"]) && $_POST["overwrite"] == $null) { 
echo 'Error, file already exists'; 
echo '<title>Error!</title>'; 
exit; 
} 
$handle = fopen($_POST["file"], 'w'); 
if (get_magic_quotes_gpc()) 
{ 
$text = stripslashes($text); 
} 
fwrite($handle, $text); 
if (get_magic_quotes_gpc()) 
{ 
$text = stripslashes($text); 
} 
  
echo 'Success, wrote ('.$text.') to file ('.$_POST["file"].')'; 
echo '<title>Success!</title>'; 
fclose($handle); 
?> 
</html>

Link to comment
https://forums.phpfreaks.com/topic/154562-strip-brackets/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.