knox Posted July 16, 2006 Share Posted July 16, 2006 How do I make this file??? I do not understand. I'm using PHPMyAdmin for database management, how do I generate this file? ??? Quote Link to comment https://forums.phpfreaks.com/topic/14788-database_connectphp/ Share on other sites More sharing options...
tomfmason Posted July 16, 2006 Share Posted July 16, 2006 [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 Quote Link to comment https://forums.phpfreaks.com/topic/14788-database_connectphp/#findComment-59063 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.