Search found 2 matches

by abcdefg
Sun Feb 21, 2010 7:50 pm
Forum: PHP - Code
Topic: Escaping a query string in php
Replies: 6
Views: 175

Re: Escaping a query string in php

Im trying to query a postgresql database. I would need to use this function below so would I just give it the whole string like this? http://php.net/manual/en/function.pg-escape-string.php $selectquery = pg_escape_string("Select * from userlogin where username = $_POST['UserName'] and password ...
by abcdefg
Sun Feb 21, 2010 6:31 pm
Forum: PHP - Code
Topic: Escaping a query string in php
Replies: 6
Views: 175

Escaping a query string in php

From what I read an apostrophe and a quote are the same thing in a php string. What is the right way to escape this string? I have tried a bunch of ways and I keep getting parse errors. "Select * from userlogin where userlogin.username=".$_POST['UserName']." and userlogin.password = &...