captainjustin
01-07-2010, 07:19 PM
I'm trying to get this page to display the users phone number if its not set to private. I just can't seem to figure it out..... If anyone could help me out I would be very great full.... The code for my whole page is listed below.
<?
include("accesscontrol.php");
$q1 = "select * from members_info order by uname desc";
$r1 = mysql_query($q1) or die(mysql_error());
while($a1 = mysql_fetch_array($r1))
{
echo " <table align=center width=470 border=1 cellspacing=0 bordercolor=black class=BlackText>
<tr style=\"background-color:#990000; font-family:verdana; font-size:11; font-weight:bold; color:white\">\n\t<td width=120 align=center>$a1[fname] $a1[lname]</td>\n\t<td width=275 align=center>Members Details</td>\n\t<td width=75 align=center>Action</td></tr>
<tr style=\"background-color:#dddddd\">
<td align=left width=120><img src=\"http://$_SERVER[HTTP_HOST]$dir/member_image/$a1[image_id]\" alt=\"Members Photo\" width=\"120\" height=\"90\"></</td>
<td width=250><b><font color=#990000>User Name:</font></b> $a1[uname]<br>
<b><font color=#990000>Birthday:</font></b> $a1[bmonth]$a1[bday]<br>
<b><font color=#990000>Location:</font></b> $a1[city], $a1[state] $a1[country]<br>
<b><font color=#990000>Phone:</font></b>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Ok here is where I'm having the problem
if ($a1[set_phone] < 1)
{
echo "$a1[phone2]";
}
else
{
echo "Set To Private";
}
{
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
</td>
<td><a class=TNA href=member_mail.php?uname=$a1[uname]><center><img src=\"http://$_SERVER[HTTP_HOST]$dir/images/mail.gif\" alt=\"Members Photo\" width=\"16\" height=\"10\"><br>E-mail</center></a><br><a class=TNA href=view_user_post.php?uname=$a1[uname]><center><img src=\"http://$_SERVER[HTTP_HOST]$dir/images/search.gif\" alt=\"Members Photo\" width=\"16\" height=\"16\"><br>Posts</center></a></td>
</tr>
</tr>
</table>
<br>";
}
include("../footer.php");
?>
<?
include("accesscontrol.php");
$q1 = "select * from members_info order by uname desc";
$r1 = mysql_query($q1) or die(mysql_error());
while($a1 = mysql_fetch_array($r1))
{
echo " <table align=center width=470 border=1 cellspacing=0 bordercolor=black class=BlackText>
<tr style=\"background-color:#990000; font-family:verdana; font-size:11; font-weight:bold; color:white\">\n\t<td width=120 align=center>$a1[fname] $a1[lname]</td>\n\t<td width=275 align=center>Members Details</td>\n\t<td width=75 align=center>Action</td></tr>
<tr style=\"background-color:#dddddd\">
<td align=left width=120><img src=\"http://$_SERVER[HTTP_HOST]$dir/member_image/$a1[image_id]\" alt=\"Members Photo\" width=\"120\" height=\"90\"></</td>
<td width=250><b><font color=#990000>User Name:</font></b> $a1[uname]<br>
<b><font color=#990000>Birthday:</font></b> $a1[bmonth]$a1[bday]<br>
<b><font color=#990000>Location:</font></b> $a1[city], $a1[state] $a1[country]<br>
<b><font color=#990000>Phone:</font></b>
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Ok here is where I'm having the problem
if ($a1[set_phone] < 1)
{
echo "$a1[phone2]";
}
else
{
echo "Set To Private";
}
{
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
</td>
<td><a class=TNA href=member_mail.php?uname=$a1[uname]><center><img src=\"http://$_SERVER[HTTP_HOST]$dir/images/mail.gif\" alt=\"Members Photo\" width=\"16\" height=\"10\"><br>E-mail</center></a><br><a class=TNA href=view_user_post.php?uname=$a1[uname]><center><img src=\"http://$_SERVER[HTTP_HOST]$dir/images/search.gif\" alt=\"Members Photo\" width=\"16\" height=\"16\"><br>Posts</center></a></td>
</tr>
</tr>
</table>
<br>";
}
include("../footer.php");
?>