Jump to content

Select Where Echo


barryflood22

Recommended Posts

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

$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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.