Jump to content

How to get html entities from $_POST?


hoangthi

Recommended Posts

Here is my basic example:

 

<?
echo $result = $_POST["test"];
?>

<form method="post" action="<?php echo $PHP_SELF;?>"> 
<b>TEST: </b> </br> <textarea rows="2" name="test" cols="60"></textarea><br />
  <input type="submit" value="submit" name="submit">
</form>

 

Input abcdefg into textarea and click Submit, and we will see

$result = abcdefg;

But if i type: /<title>(.*)<\/title>/isU

We will have

$result = /<title>(.*)<\\/title>/isU (NOT      /<title>(.*)<\/title>/isU )

I want to get $result = /<title>(.*)<\/title>/isU

Please help me.

 

Link to comment
https://forums.phpfreaks.com/topic/263862-how-to-get-html-entities-from-_post/
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.