yeah i am having a hard time also in echoing it when it is inside a class..
I tried what you gave me but it still doesn't show.. I'll post the whole code so that it would me more clear
CODE
<?php
ob_start();
session_start();
include'connect.php';
$username = $_SESSION['username'];
$cid = $_SESSION['cid'];
$query1 = "SELECT * FROM customer WHERE cid = '$cid' ";
$result1 = mysql_query($query1) or die(mysql_error());
while($row = mysql_fetch_assoc($result1))
{
$fname = $row['fname'];
$lname = $row['lname'];
}
ob_end_flush();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>View Account</title>
<link rel="stylesheet" type="text/css" href="style.css">
<style type="text/css">
<!--
.style4 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; }
.style5 {font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
font-style: italic;
font-weight: bold;
}
-->
</style>
</head>
<body leftmargin=0 topmargin=0 marginheight="0" marginwidth="0" bgcolor="#E6E6E6" backgrou"images/fon.gif">
<table border="0" cellpadding="0" cellspacing="0" width="100%" background="images/fon_top.gif" height="147">
<tr>
<td align="center" valign="top">
<table border="0" cellpadding="0" cellspacing="0" width="740">
<tr>
<td valign="top" height="68"><img src="images/logo_top.gif" width="234" height="63" alt="" border="0"></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href=""><img src="images/bo1.gif" width="83" height="42" alt="" border="0"></a></td>
<td><a href=""><img src="images/b02.gif" width="95" height="42" alt="" border="0"></a></td>
<td><a href=""><img src="images/b03.gif" width="71" height="42" alt="" border="0"></a></td>
<td><a href=""><img src="images/b04.gif" width="91" height="42" alt="" border="0"></a></td>
<td><a href=""><img src="images/b05.gif" width="95" height="42" alt="" border="0"></a></td>
<td><a href=""><img src="images/b06.gif" width="107" height="42" alt="" border="0"></a></td>
<td><a href=""><img src="images/b07.gif" width="89" height="42" alt="" border="0"></a></td>
<td><a href=""><img src="images/b08.gif" width="109" height="42" alt="" border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td background="images/fon_top02.gif" width="740" height="37" alt="" border="0" align="right">
<table border="0" cellpadding="5" cellspacing="0" background="">
<tr>
<td width="350" align="center">
</td>
<td width="175"><a href=""><img src="images/b_vcart.gif" width="139" height="20" alt="" border="0"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="740" align="center">
<tr valign="top">
<td width="159" rowspan="3">
<br>
<table border="0" cellpadding="0" cellspacing="0" width="159" background="images/fon_left02.gif">
<tr>
<td width="159" height="26" background="images/left01.gif"><p class="title">Welcome <? echo $username; ?> </p></td>
</tr>
<tr>
<td><p class="b01"><img src="images/e02.gif" width="6" height="5" alt="" border="0" align="absmiddle"> View Account </p>
<div align="center"><img src="images/hr01.gif" width="137" height="3" alt="" border="0"></div>
<p class="b01"><img src="images/e02.gif" width="6" height="5" alt="" border="0" align="absmiddle"> View Purchases </p>
<div align="center"><img src="images/hr01.gif" width="137" height="3" alt="" border="0"></div>
<p class="b01"><img src="images/e02.gif" width="6" height="5" alt="" border="0" align="absmiddle"> <a href="">View Reservation </a></p>
<div align="center"><img src="images/hr01.gif" width="137" height="3" alt="" border="0"></div>
<p class="b01"><img src="images/e02.gif" width="6" height="5" alt="" border="0" align="absmiddle"> <a href="Logout.php">Logout</a></p>
<div align="center"><img src="images/hr01.gif" width="137" height="3" alt="" border="0"></div>
</td>
</tr>
<tr>
<td><img src="images/left_bot02.gif" alt="" width="159" height="17" border="0"></td>
</tr>
</table>
</td>
<td><img src="images/m11.gif" width="1" height="16" alt="" border="0"></td>
<td><img src="images/m12.gif" width="579" height="16" alt="" border="0"></td>
<td><img src="images/m13.gif" width="1" height="16" alt="" border="0"></td>
</tr>
<tr>
<td bgcolor="#979797"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
<td bgcolor="#FFFFFF" width="579">
<table width="90%" height="277" border="0" align="center" cellpadding="3" cellspacing="0" id="body">
<tr>
<td colspan="2" class="style5">PERSONAL DETAILS
<label></label></td>
</tr>
<tr>
<td width="30%" class="text2"><div align="right" class="style4">First Name : </div></td>
<td width="41%"><span class="style4"> <? echo $fname; ?> </span></td>
</tr>
<tr>
<td class="text2"><div align="right" class="style4">Last Name : </div></td>
<td><span class="style4"> <? echo '$lname' ?> </span> </td>
</tr>
<tr>
<td colspan="2" class="style5">ADDRESS</td>
<td width="29%"> </td>
</tr>
<tr>
<td class="text2"><div align="right" class="style4">Street: </div></td>
<td><span class="style4"> <?php echo $street ?></span> </td>
</tr>
<tr>
<td class="text2"><div align="right" class="style4">City: </div></td>
<td><span class="style4"> <?php echo $city ?></span> </td>
<? if($problemcity)
{
echo '<td align="left"><font color="red" size="1">*Required.</font></td>';
}
elseif(!empty($city))
{
echo '<td align="left"><font color="blue" size="1">OK.</font></td>';
}
?>
</tr>
<tr>
<td class="text2"><div align="right" class="style4">State/Province: </div></td>
<td><span class="style4"> <?php echo $state ?></span> </td>
</tr>
<tr>
<td class="text2"><div align="right" class="style4">Zipcode: </div></td>
<td><span class="style4"> <?php echo $zipcode ?></span> </td>
</tr>
<tr>
<td class="text2"><div align="right" class="style4">Country: </div></td>
<td><span class="style4"> <?php echo $country ?></span></td>
</tr>
<tr>
<td colspan="2" class="style5">CONTACT INFORMATION </td>
<td> </td>
</tr>
<td class="text2"><div align="right" class="style4">Email Address : </div></td>
<td><span class="style4"> <?php echo $email ?></span> </td>
</tr>
<tr>
<td class="text2"><div align="right" class="style4">Contact Number : </div></td>
<td><span class="style4"> <?php echo $phone ?></span> </td>
</tr>
<tr>
<td height="15" colspan="2" class="style5">LOGIN INFORMATION
<label></label></td>
</tr>
<tr>
<td height="15" class="style4"><div align="right">Username : </div></td>
<td class="style4"> <?php echo $username ?> </td>
</tr>
<tr>
<td height="15" class="style4"><div align="right">Customer ID: </div></td>
<td class="style4"> <?php echo $cid ?></td>
</tr>
</table>
<p class="px5"></td>
<td bgcolor="#979797"><img src="images/px1.gif" width="1" height="1" alt="" border="0"></td>
</tr>
<tr>
<td><img src="images/m31.gif" width="1" height="16" alt="" border="0"></td>
<td><img src="images/m32.gif" width="579" height="16" alt="" border="0"></td>
<td><img src="images/m33.gif" width="1" height="16" alt="" border="0"></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="740" align="center">
<tr>
<td height="38" align="right" background="images/bot.gif">
<table border="0" cellpadding="0" cellspacing="0" width="570" background="">
<tr>
<td>
<p class="menu02" align="center">
<a href="">Home</a>
<a href="">About Us</a>
<a href="">Support</a>
<a href="">Services</a>
<a href="">Contacts</a>
<a href="">Help</a>
<a href="">FAQ</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><p align="right" style="margin-right: 200px;">Copyright ©2003 CompanyName.com</p></td>
</tr>
</table>
</body>
</html>
This post has been edited by antiturncoat: 19 Sep, 2007 - 05:49 PM