Ok this is getting frusterating. I'm not getting any type of error or anything, it just doesn't do anything.
<?php
mysql_connect("localhost", "username", "password");
mysql_select_db('lcfd0f5_db');
$result = msql_query("SELECT * FROM user WHERE jhorra");
echo 'this is the' $result;
?>
This is what I am using (With the correct user/password taken out) I get nothing on the page. What am I doing wrong?
This is basically just a test as I try to figure out how the connection thing works. I am working with a table that has three fields, ID, user, password. The name of the database is lcfd0f5_db
I am just trying to run a query to find a particular user, in this case jhorra as a test. Any suggestions or corrections?
Edit: With a change to my connect I now get this error.
Fatal error: Call to undefined function: msql_query() in /home/lcfd0f5/public_html/test/Main.php on line 60
Line 60 is my query line, so I think it must be incorrect somehow.
Now additionally I am using cpanel with my host. Should the username and password be what I use to log in to cpanel, or should it be something that I set in the sql database?
Is there anyplace that explains how to create query's? I tried searching on the mysql site, but I didn't have much luck.