Reputation: 14774
I am new to PHP and MySQL, can I get a smiple example of how to write the connection string, getting the results from a table with some columns and displaying them? Thank you!
Upvotes: 0
Views: 2117
Reputation: 449783
The PHP manual has full working examples.
For the mysql_*
functions: Full examples here
For PDO (a bit more complicated, but more modern and the preferable approach - use this if at all possible): Full examples here
Upvotes: 2
Reputation: 18964
http://php.net/mysql_connect
http://php.net/mysql_select_db
http://php.net/mysql_query
in that order. :)
Upvotes: 0