JSP Hosting
 

HostingServicesSupportOrderAbout UsSoftwareHome


Even experts read the manuals. Our tech support staff has most of the books that are out on a wide variety of web topics. Here are some of their top picks. We think you'll find them useful and informative as well.



PHP database connections

Perhaps the greatest feature of PHP is its ability to connect to databases, perform queries and output the results as HTML. The following example shows how to connect to a MySQL database:

<?
$dbh = mysql_connect('localhost:3306','username','password');
$res = mysql_db_query('database_name',"select * from test");
$err = mysql_error();
if($err){ echo "Error connecting to database"; }
$i=0;
while ($line = mysql_fetch_row($i)){
echo "$line<BR>\n";
$i++;
}
?>

Previous

ote: MMA technical support staff cannot provide troubleshooting of problems with third-party CGI scripts including but not limited to: Perl scripts, C/C-/5++ binaries, PHP or web/database integration unless these services are specifically contracted. For these services, please see our Quote Request Form.



Copyright © 1995-2012
Motivational Marketing Associates, LLC
All Rights Reserved.