How to unquote a string in PHP -


if quote variable prevent sql injection such:

$safe_email = $db->quote($_post['email']); 

if $_post['email'] = abc@example.com

and following:

  echo $safe_email; 

i get:

 "abc@example.com"  

the php documentation says stripslashes function "un-quotes quoted string".

however when use on quoted string such:

echo stripslashes($safe_email); 

i still string printed out in quotes

what seems problem here? it's still printing out in quotes

what's wrong this?

filter_var($_post['email'], filter_sanitize_email)

your question worries me. please read on pdo, bind parameters, , rest easier @ night. road seem traveling down 1 of security risks, , not end well.

side note: sanitize both client side , server side, , bind parameters appropriately. maybe i'm paranoid, ounce of prevention worth pound of cures imo.

well since don't seem interested in right way

$email = str_replace('"','',$email);


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -