The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End php variables Reply To: php variables


can you say the way to escape in that php pdo wrapper class??

The wrapper class you’re using extends PDO, so it already has the quote method. You can “just use it.”

Ok thanks for the advice and while binding if user inputs invalid error how to display it???

PDO uses exceptions by default, so you can just wrap your code in a try‚Ķcatch block. PDO exceptions can contain sensitive information (including DB credentials), so be sure you don’t show them on the “live” site.

catch( PDOException $PDOe ){
    if ( $youAreDebugging ){
        echo $PDOe->getMessage();
        echo "<p>sorry, something went wrong.</p>";

and i got all the great answer so how to close this thread

Can’t close. Don’t worry about it.