₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,443 members, 8,426,553 topics. Date: Sunday, 14 June 2026 at 01:03 PM

Toggle theme

Mcmorah's Posts

Nairaland ForumMcmorah's ProfileMcmorah's Posts

1 (of 1 pages)

ProgrammingRe: How Do I Connect A Form To Mysql Database by Mcmorah: 2:47pm On Aug 22, 2008
Let me second benGallery and also say you need a good grip on the php language so as to do common task like mysql database or any other database for that matter. In anycase here is a much more simpler connection script

<?php
$hostname = "localhost";
$database = "yourdatabasename";
$username = "root";
$password = "yourpassword";
$conn = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db('yourdatabasename');
?>

just paste this at the start of the source code page and be sure to substistute "yourdatabasename" and "yourpassword" with their actual values

1 (of 1 pages)