I'm having some problems while trying to connect a .php with mysql. here's the connection.php code
<?php
$db_host =$_POST['localhost'];
$db_user =$_POST['root'];
$db_password = "";
$db_name = "prtcl";
?>
ve bu aslında bağlantısını kullanabilirsiniz sayfası
<?
include("connection.php");
?>
...
<?php
$db = mysql_connect($db_host, $db_user, $db_password);
mysql_select_db($db_name, $db);
if (!$db)
{
die('Could not connect: ' . mysql_error());
}
mysql_close($db);
?>
<body>
...
ben (line 29 bu biridir bunu yüklemeye çalıştığınızda alıyorum ne:
$db = mysql_connect($db_host, $db_user, $db_password);
)
Notice: Undefined variable: db_host in C:\Program Files (x86)\EasyPHP-5.3.2\www\prtcl\index.php on line 29
Notice: Undefined variable: db_user in C:\Program Files (x86)\EasyPHP-5.3.2\www\prtcl\index.php on line 29
Notice: Undefined variable: db_password in C:\Program Files (x86)\EasyPHP-5.3.2\www\prtcl\index.php on line 29
Warning: mysql_connect() [function.mysql-connect]: [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\Program Files (x86)\EasyPHP-5.3.2\www\prtcl\index.php on line 29
Warning: mysql_connect() [function.mysql-connect]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\Program Files (x86)\EasyPHP-5.3.2\www\prtcl\index.php on line 29
Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files (x86)\EasyPHP-5.3.2\www\prtcl\index.php on line 29
Eğer bu çok kod önce çalışmak için kullanılan bu yana (farklı db elle yapılandırılmış apache / mysql kullanırken,) ben, EasyPHP kullanarak ve ben gördüğünüz gibi, neden olabilir? Diğer infos: Ben phpmyadmin kullanarak db yaptı ve ben win7 var
teşekkür ederim