Witam! Mam problem z tym skryptem. Działa on na moim kompuetrze - WebServ, Windows a na hostingu 000webhost.com już nie, tak jak na freewebhostingarea.com.
Wszystkie dane do bazy są podane dobrze, baza jest stworzona.
<?php
/ **********************************************
* Copyright (c) 2006 Roberto Toldo
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies
* or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*********************************************** /
include ("config.php");
if($install==true && $admin_pass!="")
{
$db = mysql_connect($db_host, $db_user, $db_password);
if ($db == FALSE)
die ("Error, could not connect to database, check file config.php");
mysql_select_db($db_name, $db)
or die ("Error selecting db. Check file config.php");
$query = "CREATE TABLE rtnews (id INT (5) UNSIGNED not null AUTO_INCREMENT, _rodzaj VARCHAR (30) not null, _platforma VARCHAR (30), _date VARCHAR(30), _serwer VARCHAR(30), _skill VARCHAR(30), _gg VARCHAR(30), _www VARCHAR(30), _vsvs VARCHAR(30), _info text, PRIMARY KEY (id))";
mysql_query($query, $db)
or die ("Error, could not create table!");
$query = "CREATE TABLE rtnews_auth (_password VARCHAR (100) not null)";
mysql_query($query, $db)
or die ("Error, could not create table!");
$enc = md5($admin_pass);
$query = "INSERT INTO rtnews_auth (_password) VALUES ('$enc')";
mysql_query($query, $db)
or die ("Error, could not create entry!");
echo "Installation completed
";
echo "please delete this file...
";
echo "use admin.php if you want to change the admin password...
";
mysql_close($db);
}
?>
Admin Password