in database zetten lukt niet

Gestart doorOne2xs2 reacties30 weergaven

3 berichten · pagina 1 van 1

One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
ik heb dit script:

[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"beveiliging.php"[/COLOR][COLOR= #007700])[/COLOR] ?>
<h2>download toevoegen</h2>
<form name="form1" id="form1" method="post" action="downloads">
<select name="soort">
<option value="downloads">het is een download</option>
<option value="producten">het is een product (laat link leeg)</option>
</select><br />
wat is de link naar de download?(zonder /)<br />
<INPUT TYPE="text" NAME="link" VALUE=""><br />
wat is de naam van de download?<br />
<INPUT TYPE="text" NAME="naam" VALUE="Pagina naam"><br />
<INPUT TYPE="submit" NAME="submit" VALUE="update"><br />
</FORM>
        [COLOR= #0000BB]<?php[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REQUEST_METHOD[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]"POST"[/COLOR][COLOR= #007700]){[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO `"[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]soort[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]"` (id, link, naam) VALUES (NULL, "[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]link[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]", "[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]")"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/print"]print[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
        
            [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]" Succesvol download toegevoegd"[/COLOR][COLOR= #007700];
        }[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"footer.php"[/COLOR][COLOR= #007700]);[/COLOR]
        ?>


en als ik dan toevoeg staat er:

Quote:
Table fmgroup.downloads doesnt exist Succesvol download toegevoegd
of
Table fmgroup.producten doesnt exist Succesvol download toegevoegd

maar de tabellen producten en downloads bestaan wel
hoe los ik dit op?
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Haal die vage quotes en backticks weg, dan werkt het. smile
Hij probeert nu de tabel downloads te benaderen (met de quotes erbij), terwijl je downloads (zonder quotes) wil hebben -- lijkt me.
0
One2xs

Bot · Topicstarter

Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
oke tanks
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