PHP Table Question
Posted: Sat May 02, 2009 7:26 am
Heya guys
I am new to PHP and am just tryin to display data from a mysql database in a form however its not working and i was wondering if someone could help me out.
I have got the following code:
However when i run it i get the following error:
"Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in C:\AppServ\www\PHCAS\OrdersPlaces.php on line 49"
Where line 49 is the one that contains the following:
"echo "<table width="656" border="1" align="center">"
What am i doing wrong?
Thank you in advance
Frosty
I am new to PHP and am just tryin to display data from a mysql database in a form however its not working and i was wondering if someone could help me out.
I have got the following code:
Code: Select all
<?php
$user="PHC";
$host="localhost";
$password="password";
$database = "PHCAdminSystem";
$con = mysqli_connect($host, $user, $password, $database)
or die ("Couldn't connect to the PHC SQL Server. Please try again or if the problem persists contact LKF Computing");
$query = "SELECT * FROM customer_system_report_orders_placed";
$result = mysqli_query($con, $query)
or die ("Couldn't create this report. Please try again or if the problem persists contact LKF Computing");
while($row = mysqli_fethch_assoc($result))
{
extract($row);
$f_price = number_format($TotalCost,2);
echo "<table width="656" border="1" align="center">
<tr>
<td><table width="648" border="0">
<tr>
<td width="98" class="style6">Title:</td>
<td width="538" class="style6"> </td>
</tr>
<tr>
<td class="style6">First Name: </td>
<td class="style6"> </td>
</tr>
<tr>
<td class="style6">Surname:</td>
<td class="style6"> </td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="648" border="0">
<tr>
<td width="196" class="style6">Address 1: </td>
<td width="196" class="style6"> </td>
</tr>
<tr>
<td class="style6">Address 2:</td>
<td class="style6"> </td>
</tr>
<tr>
<td class="style6">Address 3: </td>
<td class="style6"> </td>
</tr>
<tr>
<td class="style6">Address 4: </td>
<td class="style6"> </td>
</tr>
<tr>
<td class="style6">Postcode:</td>
<td class="style6"> </td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="648" border="0">
<tr>
<td><span class="style6">Date Ordered: </span></td>
<td> </td>
</tr>
<tr>
<td><span class="style6">Total Cost: </span></td>
<td> </td>
</tr>
</table></td>
</tr> <br>";
}
echo "</table>";
?>"Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in C:\AppServ\www\PHCAS\OrdersPlaces.php on line 49"
Where line 49 is the one that contains the following:
"echo "<table width="656" border="1" align="center">"
What am i doing wrong?
Thank you in advance
Frosty