Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Other Scripting Languages (http://www.programmingforums.org/forum39.html)
-   -   Mysql Problems. (http://www.programmingforums.org/showthread.php?t=1251)

Xko Nov 23rd, 2004 4:55 AM

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...

uman Dec 22nd, 2004 9:50 PM

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.

tempest Dec 22nd, 2004 11:05 PM

:

foreach($_GET as $key=>$value)
 eval("\${$key} = \"" . addslashes($value) ."\";");

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



All times are GMT -5. The time now is 2:02 PM.

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