PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
$conn = mysql_connect("localhost", "USERNAME", "PASSWORD");
mysql_select_db("DATATABLE", $conn) or die(mysql_error());
$sql = "SELECT * FROM customers WHERE cusid = '$_POST[cusid]' AND cusemail = '$_POST[cusemail]'";
$result = mysql_query($sql, $conn) or die(mysql_error());
while($custom = mysql_fetch_array($result)) {
echo "hello";
}
?>
Ok, above is my code (login.php), now for some reason when I try using this - even when I stick the correct details in (as they are in my database) anything after the
Well, if you had a connection or query error you should see a corresponding error message. Try to run the printed out query in your mysql admin panel. Just to see if it returns any results…
hawleyjr wrote:Well, if you had a connection or query error you should see a corresponding error message. Try to run the printed out query in your mysql admin panel. Just to see if it returns any results…
hawleyjr wrote:Well, if you had a connection or query error you should see a corresponding error message. Try to run the printed out query in your mysql admin panel. Just to see if it returns any results…
Just moved the echo of my query and I get this
Resource id #3
You echoed your result variable not your $sql variable...