Re: [PHP] Select and $_POST

2005-11-10 Thread Richard Lynch
On Wed, November 9, 2005 5:21 pm, Ross wrote: > $query = "SELECT * FROM login where username='$_POST['username']' AND > pass > ='$_POST['pass']'"; In addition to the fine posts regarding SQL Injection and curly braces, I'd like to provide one other alternative heretofore unmentioned: $query = "SE

Re: [PHP] Select and $_POST

2005-11-09 Thread Curt Zirzow
On Wed, Nov 09, 2005 at 11:21:36PM -, Ross wrote: > > What is the correct syntax for > > $query = "SELECT * FROM login where username='$_POST['username']' AND pass > ='$_POST['pass']'"; > http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Select and $_POST

2005-11-09 Thread Chris Shiflett
Ross wrote: $query = "SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'"; You have to use curly braces in order to interpolate an array: $string = "...{$array['foo']} ..."; By the way, my favorite username is this: chris' -- That's what all my friends call m

Re: [PHP] Select and $_POST

2005-11-09 Thread Terence
Ross wrote: What is the correct syntax for $query = "SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'"; Thought this would work. R. Search for "SQL Injection" and see why what you're doing is very dangerous. Google is your friend. -- PHP General Mail

RE: [PHP] Select and $_POST

2005-11-09 Thread Matt Babineau
$query = "SELECT * FROM login WHERE username = '".$_POST['username']."' AND pass = '". $_POST['pass']."'"; > What is the correct syntax for > > $query = "SELECT * FROM login where > username='$_POST['username']' AND pass ='$_POST['pass']'"; > > > Thought this would work. > > R. > > -- > P

[PHP] Select and $_POST

2005-11-09 Thread Ross
What is the correct syntax for $query = "SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'"; Thought this would work. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php