How I can resolve a + sign from posted HTML Request..
The String is areaname='2 Million +'
pricedelete.php?areaname=2%20Million%20+
Code as followes..
<?php
include "db.inc";
echo $HTTP_POST_VARS["areaname"];
$areaname =htmlspecialchars($HTTP_GET_VARS["areaname"]);
if (empty($areaname))
{
?>
<Script Language="JavaScript">
this.location="price.php";
</Script>
<?php
echo $areaname;
}
else
{
$insertQuery = "DELETE FROM PRICE WHERE pricedet='$areaname'";
// $insertQuery = "DELETE FROM PRICE WHERE pricedet='5 Million +'";
echo $insertQuery;
if (!($connection = @ mysql_connect($hostName,$username,$password)))
die("Could not connect to database");
if(mysql_select_db($databaseName, $connection))
echo("<p>Error performing query: " . mysql_error() . "</p>");
if(!(@ mysql_query($insertQuery,$connection)))
echo("<p>Error performing query: " . mysql_error() . "</p>");
echo "<h3>Price Successfully Deleted</h3>";
}
?>