pandemonium7386
New member
Here's the code first.
$siteQuery = mysql_query("select
siteAddress, siteCity, siteState from siteTbl where siteID = $site");
while($info = mysql_fetch_assoc($siteQuery))
{
$info['siteAddress'];
$info['siteCity'];
$info['siteState'];
}
What is the code for a function that is able to just get the siteAddress?
I tried this which didn't work.
<?php
include("dbLogin.php");
$site = 1;
function siteAddress()
{
return $info['siteAddress'];
}
print siteAddress();
?>
$siteQuery = mysql_query("select
siteAddress, siteCity, siteState from siteTbl where siteID = $site");
while($info = mysql_fetch_assoc($siteQuery))
{
$info['siteAddress'];
$info['siteCity'];
$info['siteState'];
}
What is the code for a function that is able to just get the siteAddress?
I tried this which didn't work.
<?php
include("dbLogin.php");
$site = 1;
function siteAddress()
{
return $info['siteAddress'];
}
print siteAddress();
?>