herghost Posted April 18, 2009 Share Posted April 18, 2009 I have made a big mistake, I have had a pint and now can not work out why the flip this will not work, I know its simple, i have had it working before a href='http://www.ticketmaster.com/search?q= <?php $sql = "SELECT * FROM user WHERE userid = '$userid'";$result = mysql_query($sql) or die(mysql_error());while($row = mysql_fetch_array($result)){ { echo $row['bandname']; }}?>" >Go!</a> Its just meant to search for ticketmaster.com/search?q=bandname Link to comment https://forums.phpfreaks.com/topic/154576-solved-very-quick-one/ Share on other sites More sharing options...
trq Posted April 18, 2009 Share Posted April 18, 2009 1 pint? Link to comment https://forums.phpfreaks.com/topic/154576-solved-very-quick-one/#findComment-812821 Share on other sites More sharing options...
Maq Posted April 18, 2009 Share Posted April 18, 2009 Your code is so obfuscated, if you properly formatted then you would probably see why it's not working... Try this: while($row = mysql_fetch_array($result)) { echo "Go!"; } ?> 1 pint? I know right, you must way 50lbs... Link to comment https://forums.phpfreaks.com/topic/154576-solved-very-quick-one/#findComment-812822 Share on other sites More sharing options...
eRott Posted April 18, 2009 Share Posted April 18, 2009 Well now, if he's that drunk, we might as well spell out the whole sentence not just one of the words in it. $query = "SELECT * FROM user WHERE userid = '$userid'"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { echo '<a href="ticketmaster.com/search?q='.$row['bandname'].'">Go!</a>'; } Link to comment https://forums.phpfreaks.com/topic/154576-solved-very-quick-one/#findComment-812870 Share on other sites More sharing options...
Maq Posted April 18, 2009 Share Posted April 18, 2009 Well now, if he's that drunk, we might as well spell out the whole sentence not just one of the words in it. Lol. herghost, you need to learn to properly indent and format your code, this will help with debugging. The code you posted only looks like bits and pieces of the 'real' code. Link to comment https://forums.phpfreaks.com/topic/154576-solved-very-quick-one/#findComment-812907 Share on other sites More sharing options...
herghost Posted April 18, 2009 Author Share Posted April 18, 2009 ha ha, well I am at that age where I pint leaves you feeling quite tired if you tring to stare at code. Thanks by the way! Link to comment https://forums.phpfreaks.com/topic/154576-solved-very-quick-one/#findComment-813067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.