Problemen

Gestart doorTwany17 reacties26 weergaven

18 berichten · pagina 1 van 2

Twany

Lid · Topicstarter

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

Ik heb een administratiepaneel gemaakt (yay, tis me gelukt!)
Nu wil ik dat ie met de editor niet de

tags meestuurt, weet iemand hoe ik dit moet doen?

Gr,
Tvl

0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
striptags is je vriend. RTFM wink
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Aarclay schreef:
striptags is je vriend. RTFM wink
Striptags?
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Ja, goed gezegd....
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Tvl schreef:
Eerdere citaten tonen
Aarclay schreef:
striptags is je vriend. RTFM wink
Striptags?
[func]strip_tags[/func] ja
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik kom er niet uit....
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Tvl schreef:
Ik kom er niet uit....
Wat probeer je dan...
0
Berichten
2.826
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
<html>
<head>
<title>Formuliertje</title>
[COLOR= #0000BB]<?php[/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]verzend[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #0000BB]$tekst[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]tekst[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$stripped[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/strip_tags"]strip_tags[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]$tekst[/COLOR][COLOR= #007700]);
}[/COLOR]
?>
<script>
alert ("[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"$stripped"[/COLOR][COLOR= #007700];[/COLOR] ?>");
</script>
</head>
<body>
<form action="#" method="post">
<input type="textarea" name="tekst">
<input type="submit" name="verzend">
</form>
</body>
</html>


Niet getest hoor
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Code pagina:
Spoiler tonen
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$logged[/COLOR][COLOR= #007700][[/COLOR]rank[COLOR= #007700]] >=[/COLOR] [COLOR= #DD0000]"16"[/COLOR][COLOR= #007700]){[/COLOR]
?>

[COLOR= #0000BB]<?php 
$poster[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"$logged[brgnaam]"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]menu[COLOR= #007700]]){[/COLOR]

?>


<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
             <form method="post">           
<textarea id="message" name="message" style="width:100%;height:500px;">[COLOR= #0000BB]<?php
                     $message[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$menu[/COLOR][COLOR= #007700][[/COLOR]hoofditem1[COLOR= #007700]];[/COLOR]
                     [URL="http://www.php.net/echo"]echo[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"$message"[/COLOR][COLOR= #007700]);[/COLOR]
             ?>   </textarea>
<script type="text/javascript">
    CKEDITOR.replace( message );
</script>
 
             <div align="right">
             <input type="submit" class="btn" name="menu" value="Update">
             </div>
             </form>  



[COLOR= #0000BB]<?php[/COLOR] 
[COLOR= #007700]}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$hoofditem1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]message[COLOR= #007700]];[/COLOR] 


   [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR] [COLOR= #DD0000]Location: admin.php[/COLOR] [COLOR= #007700]) ;[/COLOR]

[COLOR= #0000BB]$update[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE `menu` SET `hoofditem1` = $hoofditem1, `user` = $poster"[/COLOR][COLOR= #007700]);

}

}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
?>
You cant view this page, sorry br0!
[COLOR= #0000BB]<?php[/COLOR] 
[COLOR= #007700]}[/COLOR]
?>
Het word dus gedaan via een SQL query, zou niet weten waar ik hem in deze code in moet plaatsen
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
In je output......
Zie code /
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Al opgelost door Tyler x)
0
Berichten
443
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
smile
0
Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Leg het dan ook uit aan ons zodat we er van kunnen leren
0
Twany

Lid · Topicstarter

Berichten
1.863
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
t was dus dit:

$hoofditem1 = str_replace(<p>, , $hoofditem1); // verwijder <p> tag
   $hoofditem1 = str_replace(</p>, , $hoofditem1); // verwijder </p> tag
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Strip_tags kan ook als je de docs leest.
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