|
|
|
คือไฟล์ php ผมขึ้นเออเร่อว่า Parse error: parse error in C:\xampp\htdocs\shop\shop.php on line 394 |
|
|
|
|
|
|
|
ผมงงมากเลยครับไม่เคยเจอ
ยังไงช่วยแนะนำด้วยนะครับ
Parse error: parse error in C:\xampp\htdocs\shop\shop.php on line 394
Code (PHP)
<?php
include('information.php');
include('config.php');
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<tr class="thead">
<td width="990" height="328"> </td>
</tr ></td>
</tr>
<tr class="tbody">
<table width="940" height="410" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="5" height="7"><img src="img/0_table.jpg" width="5" height="7" border="0"></td>
<td width="927" height="7" background="img/5_table.jpg"><img src="img/5_table.jpg" width="476" height="7" border="0"></td>
<td width="10" height="7"><img src="img/10_table.jpg" width="7" height="7" border="0"></td>
</tr>
<tr>
<td width="5" height="15"><img src="img/1_table.jpg" width="5" height="15" border="0"></td>
<td width="927" height="15" background="img/6_table.jpg"><font size="2" color="#FFFFFF">Login</font></td>
<td width="10" height="15"><img src="img/11_table.jpg" width="7" height="15" border="0"></td>
</tr>
<tr>
<td width="5" height="366" background="img/2_table.jpg"> </td>
<td width="927" height="366" valign="top" background="img/bg.gif"><p align="center"><font color="#FFFFFF" size="2"><strong><em><img src="img/logo.png" alt="" width="353" height="117"><br>
Welcome to Pang-Yen Shop</em></strong></font></p>
<hr>
<style type="text/css">
a { text-decoration:none }
</style>
<script language="javascript">
<!-- Hide from non-JavaScript Browsers
function BuyItem(X,Y,X1,Y1)
{
answer = confirm("คุณต้องการซื้อ " + X + " ราคา " + Y)
if (answer !=0)
{
location = "buy.php?item_id="+X1
}
}
//Done Hiding-->
</script>
<?php
print "<br><center> <a href='?type=$nuri'>[Nuri]</a> <a href='?type=$hana'>[Hana]</a> <a href='?type=$arthur'>[Arthur]</a> <a href='?type=$cesillia'>[Cesillia]</a> <a href='?type=$max'>[Max]</a> <a href='?type=$kooh'>[Kooh]</a> <a href='?type=$arin'>[Arin]</a> <a href='?type=$kaz'>[Kaz]</a> <a href='?type=$lucia'>[Lucia]</a> <a href='?type=$nell'>[Nell]</a> <a href='?type=$clubset'>[Club Set]</a> <a href='?type=$item'>[Item]</a></ceter>";
if(!$_GET['type']){
echo "<br><font color=red>เลือกด้านบนเลยจ้า</font>";
exit;
}
echo "<br><br><table align=center bgcolor=99FF33 border=10 bordercolor=FFFF00>";
echo "<tr>";
echo "<td align=center valign=center width=150 height=40><b><font color=red>Pang</font> ($PANG)</td>";
echo "<td align=center valign=center width=150 height=40><b><font color=red>Cookie</font> ($Cookie)</td>";
echo "<td align=center valign=center width=150 height=40><b><font color=red>Point</font> ($Point)</td>";
echo "</tr>";
echo "</table>";
// query in mysql for find item
$Query = mysql_query("SELECT * FROM shop WHERE item_catagory=$_GET[type] and enable!=0");
$NumRow = mysql_num_rows($Query);
// end query find item
echo "<br><br><table align=center bgcolor=ffffff border=10 bordercolor=FFFF00>";
if($_GET['type'] == ''){
echo "<br>do something";
}else if
($_GET['type'] == '1')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=200 height=150><p><b>" . $row['item_name'] . "</p></b><img width='64' height='84' src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=200 height=150>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '2')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '3')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '4')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '5')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '6')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '7')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '8')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if
($_GET['type'] == '9')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if(
$_GET['type'] == '10')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if(
$_GET['type'] == '11')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}else if(
$_GET['type'] == '12')
{
while ($row = mysql_fetch_assoc($Query)) {
echo "<tr>";
echo "<td align=center valign=center width=150 height=100><p><b>" . $row['item_name'] . "</p></b><img src='image/".$row['item_image']."'></td>";
echo "<td align=center valign=center width=150 height=100>";
if($row['item_selltype'] == 1){
$item_type_sell = 'Pang';
}else if($row['item_selltype'] == 2){
$item_type_sell = "Cookie";
}else if ($row['item_selltype'] == 3){
$item_type_sell = "Point";
}
echo "<p><font color=FF9933>จำนวน ".$row['item_kind_num']." ชิ้น </font></p>";
echo "<p><b><font color='red'>ราคา ".$row['item_price']." $item_type_sell</font></b></p>";
?>
<input type=submit onClick="BuyItem('<?=$row['item_name']?>','<? echo $row['item_price'],' ',$item_type_sell;?>','<?=$row['ID']?>','q')" value=ซื้อไอเทมชิ้นนี้>
<?
echo "</td>";
echo "</tr>";
}
}
echo "</table>";
echo "<a href=logout.php>Logout</a>";
?>
<hr></td>
<td width="10" height="366" background="img/12_table.jpg"> </td>
</tr>
<tr>
<td width="5" height="15"><img src="img/3_table.jpg" width="5" height="15" border="0"></td>
<td width="927" height="15" background="img/8_table.jpg"><img src="img/8_table.jpg" width="476" height="15" border="0"></td>
<td width="10" height="15"><img src="img/13_table.jpg" width="7" height="15" border="0"></td>
</tr>
<tr>
<td width="5" height="7"><img src="img/4_table.jpg" width="5" height="7" border="0"></td>
<td width="927" height="7" background="img/9_table.jpg"><img src="img/9_table.jpg" width="476" height="7" border="0"></td>
<td width="10" height="7"><img src="img/14_table.jpg" width="7" height="7" border="0"></td>
</tr>
</table>
</div></td>
</tr>
<tr class="tfoot">
<td width="990" height="77" valign="top"><p> </p></td>
</tr>
</body>
</html>
Tag : PHP, MySQL, Ms SQL Server 2008, HTML/CSS
|
|
|
|
|
|
Date :
2011-03-09 00:58:42 |
By :
kanin983 |
View :
934 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row['item_price'],' ',$item_type_sell
ไอ้พวกแบบนี้ครับ เช็คดูดีๆ มันควรจะเป็นอะไร
|
|
|
|
|
Date :
2011-03-09 01:16:58 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
มันควรจะเป็นอะไรหรอครับ
แนะนำทีครับ ผมไม่รู้จริงๆ
|
|
|
|
|
Date :
2011-03-09 01:18:46 |
By :
kanin983 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$row['item_price'], ' ', $item_type_sell
แบบนี้หรือปล่าวครับ
|
|
|
|
|
Date :
2011-03-09 01:45:31 |
By :
kanin983 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|