<style>
    .frmPicture{
        width: 450px;
        margin:10px 10px 10px 10px; 
    }
    
    .strTitle{
        font-family: Arial;
        font-size: 30px;
        font-weight: bold;
    }
    .picPicture{
        width:350px; 
        height:350px;
        box-shadow: 5px 5px 10px #888888;
    }
    .btnCancel{
      margin-top: 15px;
      font-family:Arial;
	  font-size: 30px;
	  width: 180px;
	  height: 60px;
      color: #0000FF;
      border-radius: 25px;
      box-shadow: 5px 5px 10px #888888;
      cursor: pointer;
    }
	
    .btnBack{
      box-shadow: 5px 5px 10px #888888;
      cursor: pointer;
    }
</style>

<div>
  
  <?php
  $myproduct = new PRODUCT();
  $myproduct->setProduct("id",$_GET["pid"]);

//	  $myproduct->id = 1;
//	  $myproduct->name = "咸蛋酥";
//	  $myproduct->photo = "pic_shaobao.jpg";
//	  $myproduct->price = "2";
//	  $myproduct->stock = "100";
//	  $myproduct->pstatus = "1";
//	  $myproduct->tb_order = "99";

//$myproduct->saveProduct();
//$myproduct->updateProduct();
    ?>
	<div style="float:left">
        
    <form action="main.php" method="get">
	<table class="frmPicture">
	  <tr>
	    <td align="center" class="strTitle"><?= $myproduct->name ?><br /><?= $myproduct->ename ?></td>
	  </tr>
      <tr>
        <td align="center" class="strTitle"><?= $myproduct->getRinggit($myproduct->price) ?> / ps </td>
      </tr>
	  <tr>
	    <td align="center"><img src="img/<?= $myproduct->photo ?>" class="picPicture"></td>
	  </tr>
      <tr>
        <td align="center">
		    <img src="img/ico_back.png" width="150px" class="btnBack" onclick="gotoBack()" />
        </td>  
      </tr>
	</table>
    </form>
        
	</div>
    
</div>
<script>
  function gotoBack(){
    window.location = "main.php";
  }
</script>