You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ashrewdmint edited this page Sep 13, 2010
·
3 revisions
Quickbase is a lightweight, easy to use class for doing database work in PHP.
Here’s the code you’ll need to connect to a database. You should change the username, password, and database variables accordingly.
<?php
require('path/to/quickbase.php');
$server = 'localhost';
$user = 'username';
$pass = 'password';
$database = 'database_name';
$db = new Quickbase($server, $user, $pass, $database);
if ($db->status) {
// Yay, it worked!
} else {
// Oh no, something went wrong!
}
?>
That’s it! To learn more, open up the quickbase.php file. I’ve documented all of the public methods, and it’s a short class, so you should be able to get the hang of things in no time.