Jump to content

Archived

This topic is now archived and is closed to further replies.

knox

database_connect.php

Recommended Posts

How do I make this file??? I do not understand. I'm using PHPMyAdmin for database management, how do I generate this file? ???

Share this post


Link to post
Share on other sites
[code=php:0]<?php 
# the next 4 lines you can modify
$dbhost = 'yourhost';
$dbusername = 'dbusername';
$dbpasswd = 'yourpwd';
$database_name = 'nameofdatabase';

#under here, don't touch!
$connection = mysql_pconnect("$dbhost","$dbusername","$dbpasswd") 
    or die ("Couldn't connect to server.");
$db = mysql_select_db("$database_name", $connection)
    or die("Couldn't select database.");
?> [/code]

Most of the time the the host is local host.

Hope that helps,
Tom

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.