mysql escape single quote in string without slash? -


if use mysql_real_escape_string(), add slash in string, when need output, need strip slashes using stripslashes(). how can add string single quote or double quote without adding slashes in mysql

eg: $name = mysql_real_escape_string("genelia d'souza"); $result = mysql_query(" insert user (id,name) value ( 1,'$name') ");

id | name -------------------- 1  | genelia d\'souza 

want this

id | name -------------------- 1  | genelia d'souza 

is there way avoid adding slash before inserting , strip slashes before outputting???


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -