cerberus478 Posted January 14, 2013 Share Posted January 14, 2013 Hi I'm using wordpress and I want to create a link that will use the slug of an item from the database. For example if the user clicks on view of an item, then the link must direct the user to a page that will have more information of the item. I have this <?php global $wpdb; $bras = $wpdb->get_results("SELECT * FROM bras;"); ?> [/size][/font][/color] <table> <?php foreach($bras as $bra): ?> <td><?php echo $bra->title ?><br /> <img src="<?php echo bloginfo('template_directory').'/img/'.$bra->filename; ?>" /><br /> <?php echo $bra->content ?><br /> <?php echo $bra->price ?><br /> <a href="#" />View</a> <?php endforeach; ?> </td> </table> and then the user will click view and then get directed to bras_view which will then give the information of the item, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.