selecting/view one row from list
I'm quiet basic user of php & sql and wanted to do a shopping cart system I need your help for this script.
The result is all the list from the table is displayed from the page and i wanted to to have a popup page where if you click one of the product it will display from the popup
If you notice i added an anchor tag as this is the link which leads to a popup page the popup information is still under one page:
`
<table width="800px" border="0" cellpadding="0" cellspacing="7">
<? $result=mysql_query("select * from argentina");
while($row=mysql_fetch_array($result)){ ?>
<tr>
<td align="center" valign="top"><img src="../user/<?=$row["picture"]?>" height="130" /></td>
<td align="right" valign="top" bgcolor="#E0E0E0">
<table width="100%" border="0" cellspacing="0" cellpadding="15">
<tr>
<td width="78%" valign="top"><a class="inline" href="#inline_content"><strong><?=$row["name"]?></strong></a><br />
Variety: <?=$row["variety"]?> <br />
Apellation: <?=$row["apellation"]?> <br />
<td width="22%" valign="top"><?=$row["content"]?><br /><br /><br />
<a href="../../contactus.php"> <input type="button" class="button-order" value="Order Now" href="contactus.php" /></a>
//windpoppup
<div style="display:none">
<div id="inline_content" style="padding:10px;background:#fff;">
<p>//Please provide code here
</div>
</p>
</div></div><p></td> </tr><br> </table><br> </td></tr><br> <tr><td colspan="0"></td><? } ?><br> </table></p> </pre>
`
Thanks.
I would suggest you take a look at Codeigniter's Cart Class which is already well written. There is not much need to keep reinventing the wheel, but you can do so by reading their core if you wish :)
Cart Class (Obviously, you can do shopping cart with it, lots tutorial available if you do some research
链接地址: http://www.djcxy.com/p/29824.html上一篇: 读写配置文件
下一篇: 从列表中选择/查看一行