Guys, please help me figure it out. I understand programming very badly, and therefore I appeal to you. I can't connect to MySQL. When I type in the browser http: //sayt.ru/install.php, a page with windows for entering the connection data to the MYSQL opens. But when I enter, dbhost: localhost, dbusername: username, dbpass: password, dbname: database name and press the next button, the page simply refreshes and prompts you to enter the data again. Who knows, please tell me what's wrong? Perhaps in the "install.php" you need to prescribe something, or change? I would really appreciate any hint. Here is the script:
<? error_reporting(0); if ($state == "") { echo "<center><b>Установка и настройка скриптов казино, ШАГ 1</b><br><br>"; echo "Перед началом установки, создайте на своем сервере пустую базу данных,<br> и впишите параметры для подключенния ниже</center> <table border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"10\"> <FORM action=install.php method=post> <TR><td>DB host</td><TD><INPUT size=20 name=host value=localhost></TD></TR> <TR><td>DB username</td><TD><INPUT size=20 name=user></TD></TR> <TR><td>DB password</td><TD><INPUT size=20 name=pass></TD></TR> <TR><td>DB name</td><TD><INPUT size=20 name=name></TD></TR> <TR><TD><INPUT type=hidden value=1 name=state> <INPUT type=submit value=\"Далее...\"></TD></TR> </FORM> </table> <h2>ВНИМАНИЕ !!!</h2> <b>Перед установкой, найдите файл setup.php и дайте ему права на запись (777)</b> "; exit; } if ($state == "1") { $fr=fopen("setup.php","w+"); fwrite($fr, '<'."?\n"); fwrite($fr, 'error_reporting(0);'."\n"); fwrite($fr, '$dbhost="'.$host.'";'."\n"); fwrite($fr, '$dbuname="'.$user.'";'."\n"); fwrite($fr, '$dbpass="'.$pass.'";'."\n"); fwrite($fr, '$dbname="'.$name.'";'."\n"); fwrite($fr, 'mysql_connect($dbhost, $dbuname, $dbpass) or die("<br><br><center><br><br><b>Извините, но в данный момент существует проблема с подключением к MySQL серверу.<br><br>Приносим свои извинения, просим Вас зайти немного позже.</center></b>");'."\n"); fwrite($fr, 'mysql_select_db($dbname);'."\n"); fwrite($fr, '?'.'>'); fclose($fr); echo"Создание файла настроек.....ОК <br>";
Next come the tables.