| Code: |
| <?php
function connect() { $dbUser = "blahblahblah"; // 100% correct $dbPass = "blahblahblah"; // 100% correct $dbName = "blahblahblah"; // 100% correct $connect = mysql_connect("localhost", $dbUser, $dbPass) or die ("Could not connect: " . mysql_error()); $dbconnect = mysql_select_db($dbName, $connect) or die ("Could not connect: " . mysql_error()); $sql = "SELECT text FROM content WHERE content = 1"; connect(); $result = mysql_query($sql); ?> |
Later on in the page
| Code: |
|
<?php echo $result; ?> |
When I load the page all I get is Resorce id #3
If I make an incorrect password, I get the normal errors that say I can't connect and so on. I make the exact same query in phpMyAdmin and i get the desierd content... anyone know whats going on?
