PHP isset($_POST[submit]) werkt niet

Gestart doorMilan32 reacties43 weergaven

33 berichten · pagina 1 van 3

Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hallo,

Waarom werkt dit niet?

[COLOR= #0000BB]<?php[/COLOR]

[COLOR= #FF8000]/**
 * @author Milan Drossaerts
 * @mail milan50@wanadoo.nl
 * @uses ONLY BY HTTP://WWW.MENATWAR.ONE2XS.COM/
 * @rights License, ONLY USED BY HTTP://WWW.MENATWAR.ONE2XS.COM/
 * @copyright 2009
 */[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #007700]([/COLOR][COLOR= #DD0000]"config.php"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<span style="color: blue; size: 4;">Tekst invoegen</span><br>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]]))
{[/COLOR]
    [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]],[/COLOR] ENT_QUOTES[COLOR= #007700]);[/COLOR]
    [COLOR= #FF8000]//Allereerst andere functies, niet de url als eerste![/COLOR]
    [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000][b][/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]<strong>[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000][/b][/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]</strong>[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #FF8000]//Als alle functies zijn geweest de url functie:[/COLOR]
    [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000][url=[/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]<a href="[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000][/url][/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]</a>[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
    [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]][/COLOR][COLOR= #007700],[/COLOR][COLOR= #DD0000]">[/COLOR][COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
    [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"INSERT INTO admin (left,top,pageid,soort,tekst) VALUES (0,21,"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]] .[/COLOR] [COLOR= #DD0000]",1,"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]") "[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/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]<span style="color: green">Succesvol geuploaded naar jouw pagina!</span><br>[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="edit.php?id=[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$id[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]">Klik hier om terug te gaan</a>[/COLOR][COLOR= #007700];
}[/COLOR]
?>
<input type="button" onclick="addubb([b], [/b]);" value="B" class="ubb-button" />&nbsp;<input type="button" onclick="addubb([url=http://www.Google.nl]Google, [/url]);" value="Link" class="ubb-button" />
<center><br><form action="#" method="POST">
<textarea name="bericht" cols="40" rows="8" id="bericht"></textarea></center><br>
    <input type="submit" name="submit" id="submit" value="Toevoegen" /></form><br><br><br>
<a href="#" class="lbAction" rel="deactivate">Sluit dit venster</a>


Als ik op toevoegen klik, gebeurd er niks sadley
0
Miel

Lid

Berichten
4.462
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Misschien omdat je geen form hebt?winkOja; UBB Parsen is beter om te doen bij het weergeven. Verder pars je ook niet zo slim.
0
Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb een form?
Kijk maar op regel 28
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
heb je een online voorbeeld?
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
michien mag name="submit" niet, met oog op gereserveerde woorden!
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik denk dat het door de action komt!
Verander de action es in de normale pagina waar hij dan zit!
0
Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
lol, dat heeft er niks mee te maken
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ok, succes ermee!
0
Miel

Lid

Berichten
4.462
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
action="#" weghalen.
0
Berichten
2.396
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
0
Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik ga het eens porberen
0
Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
action="#"
dan gaat hij dus gewoon helemaal nergens heen? biggrin
0
Berichten
3.788
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dat zij ik ook, maar dat heeft er niks mee te maken...
0
Milan

Lid · Topicstarter

Berichten
8.602
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Als ik het weglaat werkt het ook niet, $_SERVER[REQUEST_METHOD] == POST werkt trouwens ook niet
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