![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New Coder ![]() Join Date: Feb 2005
Location: Birmingham, England
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Hey folks,
First time i've used MySQL so please be gentle... Well i have recently downloaded MyPHPVote bit of code for my site. Thing is i need to enter to information in a .php file but i'm unsure what it to put... Here's where i get stuck... Code:
<?php
$MySqlHostname = "localhost";
$MySqlUsername = "root";
$MySqlPassword = "";
$MySqlDatabase = "triphp";
$ServerConnect = mysql_connect("$MySqlHostname","$MySqlUsername","$MySqlPassword")or die ("Problem:Couldn't connect to MySQL Server.");
$DatabaseConnection = @mysql_select_db("$MySqlDatabase", $ServerConnect)or die("Problem: Couldn't select the $MySqlDatabase Database.");
?>
But what's my own config? Any pointers would be much appreciated! |
|
|
|
|
|
PM User | #2 |
|
New to the CF scene Join Date: Jan 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Your own config means in this case your db.
You got yourself a mysql database in example called: triphp Every database has a user and a pass Db: triphp user: dbuser pass: dbpass You have to fill these settings with your database name user and pass $MySqlHostname = "localhost"; <-- localhost is its own server always default and the right settings $MySqlUsername = "dbuser"; $MySqlPassword = "dbpass"; $MySqlDatabase = "triphp"; I hope this info will help |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|