How do I keep quotations in variable used with PHP string -


i using custom php query submitting custom search form. works great except if string calls name o'reilly, search come no results o\'reilly instead of o'reilly. using following call variable:

$fullname=trim($_request["fullname"]); 

and php header

 header("location: http://example.com/results?patientid=$patientid&fullname=$fullname&date=$date"); 

that redirect search results page have following code fullname:

             $patientid=trim($_request["patientid"]);              $fullname=trim($_request["fullname"]);              $date=trim($_request["date"]); 

then echo , comes o/'reilly slash in , no results.

should o'reilly

if magic quotes on automatically escapes incoming data php script. feature has been deprecated of php 5.3.0 , removed of php 5.4.0. when on, ' (single-quote), " (double quote), \ (backslash) , null characters escaped backslash automatically. magic_quotes_gpc affects http request data (get, post, , cookie). cannot set @ runtime, , defaults on in php.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -