Conecting to database
I'm reusing a form that is supposed to connect to my database, but it keeps giving me the same error:
On line 60 this is what it says:
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'surftowndk' (1) in /home/www/wearecrunch.dk/gammelsjuf/ajax/register-process.php on line 60
You can see what I meen if you go to:
$db_conn=mysql_connect($mydb19.surftown.dk, $adamkis_adam, $mypass);
and then click register and fill in the form with random txt and click register at the bottom.
Then the error messages will appear.
I hope someone in here can help me.
I suspect that what you want is:
You were concatenating a PHP variable to 2 undefined contants, which PHP assumed to have a value the same as their names (an assumption I wish PHP did not make and instead threw an error/exception instead of just a warning).
$db_conn=mysql_connect($mydb19.'.surftown.dk', $adamkis_adam, $mypass);
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Thanks for your answer, but it still gave me the same error.
So I tried something else now, and it gives me a different error, but it waits about 5 seconds before it gives the error, before that it is just a blank page.
now the error is:
and line 60 is:
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 in /home/www/wearecrunch.dk/gammelsjuf/ajax/register-process.php on line 60
I hope you can help.
$db_conn=mysql_connect('mydb19.surftown.dk', 'adamkis_adam', $mypass);
You should consult with your developer.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread