Jump to content

[SOLVED] unexpected '/'


aebstract

Recommended Posts

Sigh  :-[

<?php

$content .= "


<table align=center>
<tr><td>
<a onclick=\"return showPic(this);\" href=\"/ph/main.jpg\" title=\"Main ph assembly\">Main ph assembly</a>
<br /><br />



$content .= "</td><td align=\"center\">
<p><a href=\"/ph/mainL.jpg\" rel=\"lightbox\" title=\"ph Assembly Drawings\"><img id=\"placeholder\" src=\"/ph/main.jpg\" alt=\"\" border=\"0\" /></a></p>
<br />
Click image to view full size.
</td><td>


</td></tr>
</table>
";


$content .="<br /><br />";

    $color1 = "#dddddd";
    $color2 = "#c0c0c0";
    $row_count = 0;

$parts .= "<center>
<form action=\"/cart/\" method=\"post\">
<table width=732 cellpadding=3><tr bgcolor=#8d8d8d cellspacing=6><td width=10 align=center class=tclassd><a href=\"/order/ph/\">LOC</a></td><td width=100 class=tclassd><a href=\"/order/ph/pn/\">Part Number</a></td><td width=475>Description</td><td width=50>Price</td><td>QTY</td></tr>";

if ($order == pn){
$orderby = PN;
} else {
$orderby = LOC;
}

$result2 = mysql_query("SELECT * FROM parts WHERE MCHN='ph' ORDER BY $orderby, SUB ASC") or DIE(mysql_error());
while($r2=mysql_fetch_array($result2))
{
$pid=$r2["id"];
$loc=$r2["LOC"];
$pn=$r2["PN"];
$desc=$r2["DESC"];
$price=$r2["PRICE"];
$sub=$r2["SUB"];
$tpn=$r2["TPN"];

$row_color = ($row_count % 2) ? $color1 : $color2;


$quan = ($_SESSION['cart'][$pid] < 1) ? "0" : $_SESSION['cart'][$pid];


if($_SESSION["id"] == 92)
{
$adminedit = "<td align=center bgcolor=\"$row_color\"><a href=\"/accounthome/tools/changeparts/$pid/\"><img src=\"/images/pencil.gif\" border=\"0\" /></a></td>";
}


if ($pt == 1){

if (!empty($tpn)) {

if ($sub == 0){
$parts .= "<tr cellspacing=6><td align=center bgcolor=\"$row_color\">$loc</td><td bgcolor=\"$row_color\" width=\"100\">$tpn</td><td bgcolor=\"$row_color\" width=\"330\">$desc <font size=\"1\">Berry Part # $pn</font></td><td bgcolor=\"$row_color\" align=\"right\">$price</td><td bgcolor=\"$row_color\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>";
} else {
$parts .= "<tr cellspacing=6><td align=center bgcolor=\"#ebebeb\">$loc-$sub</td><td bgcolor=\"#ebebeb\" width=\"100\">$tpn</td><td bgcolor=\"#ebebeb\" width=\"330\">$desc <font size=\"1\">Berry Part # $pn</font></td><td bgcolor=\"#ebebeb\" align=\"right\">$price</td><td bgcolor=\"#ebebeb\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>";
}

} else {

if ($sub == 0){
$parts .= "<tr cellspacing=6><td align=center bgcolor=\"$row_color\">$loc</td><td bgcolor=\"$row_color\" width=\"100\">$pn</td><td bgcolor=\"$row_color\" width=\"330\">$desc</td><td bgcolor=\"$row_color\" align=\"right\">$price</td><td bgcolor=\"$row_color\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>";
} else {
$parts .= "<tr cellspacing=6><td align=center bgcolor=\"#ebebeb\">$loc-$sub</td><td bgcolor=\"#ebebeb\" width=\"100\">$pn</td><td bgcolor=\"#ebebeb\" width=\"330\">$desc</td><td bgcolor=\"#ebebeb\" align=\"right\">$price</td><td bgcolor=\"#ebebeb\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>$adminedit</tr>";
}

}






} else {
if ($sub == 0){
$parts .= "<tr cellspacing=6><td align=center bgcolor=\"$row_color\">$loc</td><td bgcolor=\"$row_color\" width=\"100\">$pn</td><td bgcolor=\"$row_color\" width=\"330\">$desc</td><td bgcolor=\"$row_color\" align=\"right\">$price</td><td bgcolor=\"$row_color\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>adminedit</tr>";
} else {
$parts .= "<tr cellspacing=6><td align=center bgcolor=\"#ebebeb\">$loc-$sub</td><td bgcolor=\"#ebebeb\" width=\"100\">$pn</td><td bgcolor=\"#ebebeb\" width=\"330\">$desc</td><td bgcolor=\"#ebebeb\" align=\"right\">$price</td><td bgcolor=\"#ebebeb\"><input type=\"text\" size=\"5\" name='items_quantity[{$pid}]' value=\"".$quan."\" /></td>adminedit</tr>";
}

}


$row_count++;
}

if (isset($_SESSION['cart'])) {
$cartbutton = "Update Cart";
} else {
$cartbutton = "Add To Cart";
}
$parts .= "</table><p align=right><input type=\"submit\" name=\"submit\" class=\"textfield\" value=\"$cartbutton\" /></p></form></center>";


if (ph == ph){
$content .= "<h1>Paw Harvester</h1>";
}

$content .= "$parts";

?>

 

 

Parse error: syntax error, unexpected '/' in /home/virtual/site21/fst/var/www/html/images/ph/ph.php on line 13

 

Link to comment
https://forums.phpfreaks.com/topic/133334-solved-unexpected/
Share on other sites

you didn't close your first string, and were missing a \ after align= in the second block

 

<?php

$content .= "


<table align=center>
<tr><td>
<a onclick=\"return showPic(this);\" href=\"/ph/main.jpg\" title=\"Main ph assembly\">Main ph assembly</a>
<br /><br />";



$content .= "</td><td align=\"center\">
<p><a href=\"/ph/mainL.jpg\" rel=\"lightbox\" title=\"ph Assembly Drawings\"><img id=\"placeholder\" src=\"/ph/main.jpg\" alt=\"\" border=\"0\" /></a></p>
<br />
Click image to view full size.
</td><td>


</td></tr>
</table>
";

Link to comment
https://forums.phpfreaks.com/topic/133334-solved-unexpected/#findComment-693462
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.