I actually tried that and also var_dump, the value I added in my first post is the value being processed, the exact same code works in my local machine it just does not work in the server and also only happens to the values passed to the mysql_real_escape_string all other post values like int which I cast or I do a regular expression search work just fine, this is what I'm doing
PHP Code:
$street = isset ( $_POST["street"] ) ? mysql_real_escape_string ( $_POST["street"] ) : "";
$town = isset ( $_POST["town"] ) ? mysql_real_escape_string ( $_POST["town"] ) : "";
$city = isset ( $_POST["city"] ) ? mysql_real_escape_string ( $_POST["city"] ) : "";
$state = isset ( $_POST["state"] ) ? mysql_real_escape_string ( $_POST["state"] ) : "";
$country = isset ( $_POST["country"] ) ? mysql_real_escape_string ( $_POST["country"] ) : "";
$zipcode = isset ( $_POST["zipcode"] ) ? mysql_real_escape_string ( $_POST["zipcode"] ) : "";
$coordinates = isset ( $_POST["coordinates"] ) ? preg_replace ( "/[^0-9,.-]/", "", $_POST["coordinates"] ) : "";
$phone = isset ( $_POST["phone"] ) ? preg_replace ( "/[^0-9]/", "", $_POST["phone"] ) : "";
$website = isset ( $_POST["website"] ) ? filter_var ( $_POST["website"], FILTER_VALIDATE_URL ) : "";
$favoritebook = isset ( $_POST["favoritebook"] ) ? mysql_real_escape_string ( $_POST["favoritebook"] ) : "";
$aboutme = isset ( $_POST["aboutme"] ) ? mysql_real_escape_string ( $_POST["aboutme"] ) : "";
When I do var_dump all values are there this is it
PHP Code:
array(14) { ["uid"]=> string(2) "54" ["coordinates"]=> string(40) "(39.950471420868766, -82.93292737500002)" ["street"]=> string(19) "2419 S Havenwood Dr" ["town"]=> string(13) "East Columbus" ["city"]=> string(8) "Franklin" ["state"]=> string(4) "Ohio" ["country"]=> string(13) "United States" ["zipcode"]=> string(5) "43209" ["phone"]=> string(7) "8765432" ["website"]=> string(26) "http://www.tlacaelelrl.com" ["favoritebook"]=> string(9) "some book" ["aboutme"]=> string(9) "some info" ["birthdate"]=> string(10) "01/04/1983" ["option"]=> string(17) "com_fantasyleague" }
Bookmarks