Archive

Posts Tagged ‘POST’

Sanitize MySQL Inputs

November 13th, 2009 No comments
Sanitize MySQL Inputs Prepare the data so that when it gets added to your SQL query it doesn’t break the server ( Defence SQL injection attack ). When a form has been submitted via GET or POST all data is stored in the ...

Random Post List without plugin – Wordpress

September 13th, 2009 No comments
Random Post List without plugin – Wordpress how to make a random post list on your sidebar: <ul> <?php $myq = new WP_Query('showposts=10&orderby=rand'); if($myq->have_posts()) : while($myq->have_posts()) : $myq->the_post(); ?> <li><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e('Permanent link to'); ?> <?php the_title(); ?>"><?php the_title(); ?></a></li> <?php endwhile; endif; ?> </ul>
Categories: Bookmarks, Tech, Wordpress Tags: , , ,

Remove HTML tags from POST and GET – PHP

April 6th, 2009 No comments
Remove HTML tags from POST and GET – PHP How to remove/Strip HTML tags from php $_POST variable: foreach ($_POST as $key => $value) { $_POST[$key] = addslashes(strip_tags($value)); } foreach ($_GET as $key => $value) { $_GET[$key] = addslashes(strip_tags($value)); } strip_tags - tries to return a string with all HTML and PHP tags stripped from a ...
GoCache - ByREV-Cache v1.0 - live served in : 0.351163 sec (gzip)