Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,158,217 members, 7,836,056 topics. Date: Tuesday, 21 May 2024 at 08:02 PM

Mcmorah's Posts

Nairaland Forum / Mcmorah's Profile / Mcmorah's Posts

(1) (of 1 pages)

Programming / Re: 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)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.