Code: Select all
function print_form()
{
echo <<<STOP
<html>
<body>
code
</body>
</html>
STOP;
}Code: Select all
<?php
echo $C_First=$_POST['C_First'];
?>Moderator: General Moderators
Code: Select all
function print_form()
{
echo <<<STOP
<html>
<body>
code
</body>
</html>
STOP;
}Code: Select all
<?php
echo $C_First=$_POST['C_First'];
?>Code: Select all
function print_form()
{
$var1 = 'Hello World';
$var2 = 27;
echo <<<STOP
<html>
<body>
<p>{$var1}</p>
<p>{$var2}</p>
</body>
</html>
STOP;
}Code: Select all
function print_form()
{
$var = <<<STOP
<html>
<body>
code
</body>
</html>
STOP;
return $var;
}Code: Select all
function print_form()
{
print <<<STOP
<html>
<body>
code
</body>
</html>
STOP
}Code: Select all
<?php echo number_format($rowї"P_Price"], 2, ".", ","); ?>at the end of the page (which is at the end of the next function {not showen here})Parse error: parse error, unexpected $
Code: Select all
echo <<<STOP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Model Aircraft</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="all">
@import "model.css";
</style>
</head>
<body>
<div id="container"><h1>Models</h1>
<!-- Begin Content -->
<div id="content">
<form method="post">
<h2>Summary</h2>
<p class="text">
<table width="500">
<!--DWLayoutTable-->
<tr>
<td width="80" height="21" valign="top">First Name:</td>
<td width="135" valign="top">{$C_First}</td>
<td width="91" valign="top">Last Name: </td>
<td width="172" valign="top">{$C_Last}</td>
</tr>
<tr>
<td height="21" valign="top">Email:</td>
<td valign="top">{$C_Email}</td>
<td valign="top">Phone:</td>
<td valign="top">{$C_Phone}</td>
</tr>
<tr>
<td height="21" valign="top">Address 1:</td>
<td valign="top">{$C_Address1}</td>
<td valign="top">Address 2:</td>
<td valign="top">{$C_Address2}</td>
</tr>
<tr>
<td height="21" valign="top">Country:</td>
<td valign="top">{$C_Country}</td>
<td valign="top">City:</td>
<td valign="top">{$C_City}</td>
</tr>
</table>
<br />
<table width="450">
<tr>
<td width ="100">Select Zone:</td>
<td>{$C_Freight}</td>
</tr>
</table>
<br />
<table width="500">
<tr>
<td width="91" height="40" valign="top"><strong>Aircraft</strong></td>
<td width="105" valign="top"><strong>Name</strong></td>
<td colspan="2" valign="top"><strong>Price Ea</strong></td>
<td width="51" align="left" valign="top"><strong>Qty</strong></td>
<td colspan="2" valign="top"><strong>Sub-Total</strong></td>
</tr>
STOP;
while($row = mysql_fetch_array($result))
{
$totalCost += ($rowї"qty"] * $rowї"P_Price"]);
echo <<<STOP
<tr>
<td height="64" valign="top"><img src=http://www.modelaircraft.co.nz/Pics/{$rowї"P_Stock"]}.jpg alt="image of plane" width="82" height="62" class="planeimage" /></td>
<td>{$rowї"P_Name"]}</td>
<td colspan="2" valign="middle">${$rowї"P_Price"]}</td>
<td align="left" valign="middle">{$rowї"qty"]}</td>
<td colspan="2" valign="middle"> $ </td>
</tr>
STOP;
} //end loop
echo <<<STOP
<tr>
<td height="21" colspan="6" valign="top"><hr size="1" color="#666666" NOSHADE /></td>
<td width="66" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="30" colspan="3" valign="center"><!--DWLayoutEmptyCell--> </td>
<td colspan="2" valign="top"><strong>Freight:</strong> </td>
<td colspan="2" valign="top">$</td>
</tr>
<tr>
<td height="30" colspan="3" valign="top"><!--DWLayoutEmptyCell--> </td>
<td colspan="2" valign="top"><strong>Total: </strong></td>
<td colspan="2" valign="top">$</td>
</tr>
</table>
<p class = "text">
<input name="Submit" type="submit" value="Submit" class="button"/>
</p>
</p>
</form>
</div>
<!-- End Content -->
</div>
</body>
</html>
STOP;
}Code: Select all
<td colspan="2" valign="top">$</td>Parse error: parse error, unexpected $
Code: Select all
echo <<<STOP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Model Aircraft</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css" media="all">
@import "model.css";
</style>
</head>
<body>
<div id="container"><h1>Models</h1>
<!-- Begin Content -->
<div id="content">
<form method="post">
<h2>Summary</h2>
<p class="text">
<table width="500">
<!--DWLayoutTable-->
<tr>
<td width="80" height="21" valign="top">First Name:</td>
<td width="135" valign="top">{$C_First}</td>
<td width="91" valign="top">Last Name: </td>
<td width="172" valign="top">{$C_Last}</td>
</tr>
<tr>
<td height="21" valign="top">Email:</td>
<td valign="top">{$C_Email}</td>
<td valign="top">Phone:</td>
<td valign="top">{$C_Phone}</td>
</tr>
<tr>
<td height="21" valign="top">Address 1:</td>
<td valign="top">{$C_Address1}</td>
<td valign="top">Address 2:</td>
<td valign="top">{$C_Address2}</td>
</tr>
<tr>
<td height="21" valign="top">Country:</td>
<td valign="top">{$C_Country}</td>
<td valign="top">City:</td>
<td valign="top">{$C_City}</td>
</tr>
</table>
<br />
<table width="450">
<tr>
<td width ="100">Select Zone:</td>
<td>{$C_Freight}</td>
</tr>
</table>
<br />
<table width="500">
<tr>
<td width="91" height="40" valign="top"><strong>Aircraft</strong></td>
<td width="105" valign="top"><strong>Name</strong></td>
<td colspan="2" valign="top"><strong>Price Ea</strong></td>
<td width="51" align="left" valign="top"><strong>Qty</strong></td>
<td colspan="2" valign="top"><strong>Sub-Total</strong></td>
</tr>
STOP;
while($row = mysql_fetch_array($result))
{
$totalCost += ($rowї"qty"] * $rowї"P_Price"]);
echo <<<STOP
<tr>
<td height="64" valign="top"><img src=http://www.modelaircraft.co.nz/Pics/{$rowї"P_Stock"]}.jpg alt="image of plane" width="82" height="62" class="planeimage" /></td>
<td>{$rowї"P_Name"]}</td>
<td colspan="2" valign="middle">x{$rowї"P_Price"]}</td>
<td align="left" valign="middle">{$rowї"qty"]}</td>
<td colspan="2" valign="middle"> x </td>
</tr>
STOP;
} //end loop
echo <<<STOP
<tr>
<td height="21" colspan="6" valign="top"><hr size="1" color="#666666" NOSHADE /></td>
<td width="66" valign="top"><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>
<td height="30" colspan="3" valign="center"><!--DWLayoutEmptyCell--> </td>
<td colspan="2" valign="top"><strong>Freight:</strong> </td>
<td colspan="2" valign="top">x</td>
</tr>
<tr>
<td height="30" colspan="3" valign="top"><!--DWLayoutEmptyCell--> </td>
<td colspan="2" valign="top"><strong>Total: </strong></td>
<td colspan="2" valign="top">x</td>
</tr>
</table>
<p class = "text">
<input name="Submit" type="submit" value="Submit" class="button"/>
</p>
</p>
</form>
</div>
<!-- End Content -->
</div>
</body>
</html>
STOP;
}