Connect probleem

Gestart doorShahiem4 reacties48 weergaven

5 berichten · pagina 1 van 1

Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als ik een nieuwe bericht wil toevoegen aan mijn nieuwsysteem krijg ik een error als ik het wilt versturen.
Foutmelding:

Warning: mysql_query() [function.mysql-query]: Cant connect to local MySQL server through socket /var/run/mysqld/mysqld.sock (2) in /home/vol9/byethost12.com/b12_3698192/htdocs/nieuws/voegtoe.php on line 9

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/vol9/byethost12.com/b12_3698192/htdocs/nieuws/voegtoe.php on line 9

Hij zegt dat ie niet connect maar ik heb dat wel gedaan.

Mijn code:

[COLOR= #0000BB]<?php[/COLOR] 
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"../data.inc"[/COLOR][COLOR= #007700]);[/COLOR] 

[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]bevestiging[COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]) {[/COLOR] 
    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"INSERT INTO nieuws SET "[/COLOR][COLOR= #007700];[/COLOR] 
    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"id = "[/COLOR][COLOR= #007700];[/COLOR] 
    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]", titel = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]titel[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] 
    [COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]", bericht = "[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] 
    [COLOR= #0000BB]$res[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR] 
    [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]bevestiging[COLOR= #007700]] =[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]; 
}[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR] 
    [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]" 
        <form action="voegtoe.php" method="POST"> 
            <input type="hidden" value="1" name="bevestiging" /><br /> 
            <input type="text" name="titel" value="Titel" /><br /> 
            <textarea name="bericht">Bericht</textarea><br /> 
            <input type="reset" value="Reset" /> 
            <input type="submit" value="Submit" /> 
        </form> 
    "[/COLOR][COLOR= #007700]; 
}[/COLOR] 
[URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"<a href="admin.php">Ga terug naar de admin</a>"[/COLOR][COLOR= #007700];[/COLOR] 
?>
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
BUMPie
0
Erik

Lid

Berichten
7.109
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dan doet de MySQL het niet op de server.
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
misschien ff met database connecten enzo? emo
0
Shahiem

Lid · Topicstarter

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij doet het alyummie
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren