Possible query problem

From: Date: Tue, 28 Oct 2003 16:49:55 +0000
Subject: Possible query problem
Groups: php.general 
Request: Send a blank email to php-general+get-167887@lists.php.net to get a copy of this message
Yestery day I got help from several of you on my function. I tried to get complicated today and so here it is. I am working on a peice of code where if a condition of a database entery is 0 then it will take you to one page if it is one it will take you to another page. Here is the function: $payment1 = $_POST["payment"]; function payment(){ global $payment1; if ($payment1 == "0"){ header ('Location: http://ftudor/test/test_page.html'); } elseif ($payment1 == "1") { header ('Location: http://ftudor/test/test_page2.html'); } } payment(); It works (thanks to many) but I have another problem. Basically the user will have to supply a username and password, then the sql statement will go through something like this: $query="SELECT payment FROM payment WHERE dln='".$_POST["dln"]."' = payment.dln='".$_POST["dln"]."' and users.password='".$_POST["password"]."'"; then it should return a 0 or a 1 and that will go into the function and route a user to the right page. Since I don't have a payment processing tool in place I have to hfake a condition. The page just cycles into itself and keeps promting for username and password over and over. Do you think it's my sql? Frank __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com

« previous php.general (#167887) next »