barryflood22 Posted October 22, 2012 Share Posted October 22, 2012 I cant get this script to work, anybody have any ideas? <?php //ECHO LOCATION echo '<p><b>Location: </b>'; // get area details $query2="select * from jos_RAM_areas WHERE id = '".$row['area']."' "; $sth2=mysql_query($query2); $Location=$sth2['fullname']; $Area = "$Location"; echo $Area; $town_city = $row['town_city']; if ($town_city!='') { echo "\n\n$town_city"; } ?> Link to comment https://forums.phpfreaks.com/topic/269783-select-where-echo/ Share on other sites More sharing options...
Barand Posted October 22, 2012 Share Posted October 22, 2012 Define "not working" Link to comment https://forums.phpfreaks.com/topic/269783-select-where-echo/#findComment-1387002 Share on other sites More sharing options...
ManiacDan Posted October 22, 2012 Share Posted October 22, 2012 $sth2=mysql_query($query2); $Location=$sth2['fullname']; If "not working' means "PHP throws a serious warning about this line being wrong," then you're not calling the appropriate fetch function on your result. If "not working" means "no errors, I just don't know what's happening," turn errors on, then see sentence #1. Link to comment https://forums.phpfreaks.com/topic/269783-select-where-echo/#findComment-1387011 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.