Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 23rd, 2004, 4:55 AM   #1
Xko
Newbie
 
Join Date: Sep 2004
Posts: 18
Rep Power: 0 Xko is on a distinguished road
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...
Xko is offline   Reply With Quote
Old Dec 22nd, 2004, 9:50 PM   #2
uman
Expert Programmer
 
Join Date: Dec 2004
Posts: 794
Rep Power: 4 uman is on a distinguished road
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
uman is offline   Reply With Quote
Old Dec 22nd, 2004, 11:05 PM   #3
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
foreach($_GET as $key=>$value)
 eval("\${$key} = \"" . addslashes($value) ."\";");

foreach($_POST as $key=>$value)
 eval("\${$key} = \"" . addslahes($value) . "\";");
__________________

tempest is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:37 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC