Jump to content

[SOLVED] Using de-hacking functions


dreamwest

Recommended Posts

Im trying to filter hacking attempts on this form but keep getting this error message:

 

Fatal error: Call to undefined function safe_ouput() in \get_post.php on line 14

 

What am I doing wrong??

 

<?php

function safe_output($string) {

$string = trim($string);
$string = strip_tags($string);
$string = htmlspecialchars($string);
return $string;
}


if ($_GET ['action'] == 'send') {

echo ('Data = '.safe_ouput($_GET['keyword']));
}

?>

<form method="get" action ="get_post.php">
<fieldset>
<legend>Programming Form</legend><br>
<input type="text" name ="keyword" size ="25"><br><br>
<input type="submit" name ="action" value ="send">
</fieldset>
</form>

Link to comment
https://forums.phpfreaks.com/topic/83696-solved-using-de-hacking-functions/
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.