A2xA Posted August 23, 2008 Share Posted August 23, 2008 I'm trying to pass a variable in my linked image that says "Join Battle" <a href="http://site.com/battle/index.php?id=' . stripslashes($row['linksLink']) . '" target="_blank"><img src="'.$site_url.'/templates/default/images/visit.png" /></a> What will be the best way to pass the ' . stripslashes($row['linksLink']) . ' in the code to the next page? Quote Link to comment Share on other sites More sharing options...
Fadion Posted August 23, 2008 Share Posted August 23, 2008 In the next page you should do: <?php $id = $_GET['id']; //consider using mysql_real_escape_string() if $id is going to be used for a query ?> Quote Link to comment Share on other sites More sharing options...
A2xA Posted August 23, 2008 Author Share Posted August 23, 2008 I'm not posting any variables it's just in the link itself. That's why I'm not sure how to $GET the generated id?= code. Quote Link to comment Share on other sites More sharing options...
Fadion Posted August 23, 2008 Share Posted August 23, 2008 Maybe it's me, but i don't get this. Your link looks alright and you can $_GET the variable. Can you explain it a bit better? Quote Link to comment Share on other sites More sharing options...
A2xA Posted August 24, 2008 Author Share Posted August 24, 2008 my bad this works Thanks! 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.