Im trying to make my post random when i lick on my button using $_GET but it just keeps refreshing my page instead of refreshing with the random post.
<a href="<?php echo $my_query; ?>?p=random"><img src="<?php bloginfo('template_directory'); ?>/images/shakeup.png" alt="" /></a>
<?php if(isset($_GET['p']) && $_GET['p']=='random') {?>
<?php $my_query = new WP_Query('orderby=rand'); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
im getting this error now "Call to a member function have_posts() on a non-object in"

query_posts();instead. – Sisir Aug 15 '11 at 18:42