![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2004
Posts: 18
Rep Power: 0
![]() |
As a complete novice to anything MySQL related i would like to add a small strategy game from hotscripts.com to my site. The thing is i'm not sure what info the file is asking for.
I have to configure the following .php file... <?
// Enter your MySQL settings below
$mysql_server = "";
$mysql_user = "";
$mysql_password = "";
$mysql_database = "";
$connection = mysql_connect("$mysql_server","$mysql_user","$mysql_password") or die ("Unable to connect to MySQL server.");
$db = mysql_select_db("$mysql_database") or die ("Unable to select requested database.");
$PHP_PHAOS_USER = $_COOKIE["PHP_PHAOS_USER"];
$PHP_PHAOS_PW = $_COOKIE["PHP_PHAOS_PW"];
foreach($_GET as $key=>$value) {
eval("$$key = \"$value\";");
}
foreach($_POST as $key=>$value) {
eval("$$key = \"$value\";");
}
?>But i don't know what i should enter and don't want to mess anything up! I know it's asking for my sql settings but i'm unsure what they are... |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
First, make sure your web host offers mySQL databases. Many do not.
If they do, set one up. When you choose a username, password and database name, put those between the double quotes. Usually the server name is "localhost" but not always, so be sure to check with your hosting provider.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
foreach($_GET as $key=>$value)
eval("\${$key} = \"" . addslashes($value) ."\";");
foreach($_POST as $key=>$value)
eval("\${$key} = \"" . addslahes($value) . "\";");
__________________
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|