every time i get this error:

Warning: MySQL Connection Failed: Unknown MySQL Server Host '0f2scom' (2) in
/web/sites/139/gamie/www.game-boy-advance.f2s.com/addartikel.php on line 22
Unable toconnect to database

this is de code(ther are dutch line's in it because this code is for an
dutch site):

<?php

if ($action == 'add') {


if ($titel == '') {
echo "<center><font face=verdana size=2><span style=color:red;>U heeft geen
titel ingevoerd! <a href=javascipt:history.go
(-1)>Terug!</a></span></font></center>";
}

elseif ($inhoud == '') {
echo "<center><font face=verdana size=2><span style=color:red;>U heeft geen
inhoud ingevoerd! <a href=javascipt:history.go
(-1)>Terug!</a></span></font></center>";
}

else {
$DBhost = "db.game-boy-advance.f2s.com";
$DBuser = "*****";
$DBpass = "*******";
$DBName = "*******";
$table = "nieuws";

mysql_connect(db.game-boy-advance.f2s.com,*****,******) or die("Unable
toconnect to database");
@mysql_select_db("db.game-boy-advance.f2s.com") or die("Unable to select
database gamie");

$sqlquery = "SELECT max(id) FROM nieuws";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
$art_id = ($number+1);

$sqlquery = "INSERT INTO nieus VALUES ('', '$inhoud', '$titel')";
$result = mysql_query($sqlquery);

echo "<center><table width=500 cellspacing=0 cellpadding=0><tr><td
align=center><font face=verdana size=2>
Uw artikel <b> $titel </b> is succesvol toegevoegd aan onze database. Klik
<a href=showartikel.php?art_id=$art_id>hier</a>
om hem te bekijken!</td></tr></table></center>";

}
}

else {

echo    "<center>
   <form action='addartikel.php' method='POST'>
   <input type='hidden' name='action' value='add'>
   <table width='500' cellspacing='0' cellpadding='4' border=1
bordercolor='black'>
   <tr><td bgcolor='black' colspan=2><font face=verdana size=2
color=white>Voeg een artikel toe (ook html toegestaan)</font></td></tr>
   <tr><td><font face=verdana size=2><b>Titel</b></font></td><td><input
type=text' name='titel' size=25></td></tr>
   <tr><td valign=top><font face=verdana
size=2><b>Inhoud</b></font></td><td><textarea name='inhoud' cols=50
rows=10></textarea></td></tr>
   <tr><td bgcolor='black' colspan=2><input type=submit value='Voeg Artikel
toe!'> <input type=reset value='Herstel de waarden!'></td></tr>
   </table></center>";

}

?>

what's wrong?




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to