This is a Quick Tip on how to connect to MySQL with PHP. We have all done it from time to time, but sometimes we forget just how to connect to those pesky MySQL databases directly using PHP. So here’s how it’s done:
<?php
function open( ){$db = mysql_connect( ‘localhost’, ‘root’, ‘password’ );
} ?>
Here we have custom a function “open”. Followed by the mysql_connect function which we will supply the url, username, and password. It’s pretty simple to do in PHP. Thanks for reading …
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL
Leave a comment
You must be logged in to post a comment.
