gpt4 book ai didi

php - 从列表中选择/查看一行

转载 作者:行者123 更新时间:2023-11-30 23:23:56 26 4
gpt4 key购买 nike

我是 php 和 sql 的基本用户,想做一个购物车系统我需要你的帮助来完成这个脚本。

结果是表格中的所有列表都显示在页面上,我想有一个弹出页面,如果您单击其中一个产品,它将从弹出窗口中显示

如果您注意到我添加了一个 anchor 标记,因为这是指向弹出页面的链接,弹出信息仍在一页下:

`

    

<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>&lt;/td&gt; &lt;/tr&gt;<br>
&lt;/table&gt;<br>
&lt;/td&gt;&lt;/tr&gt;<br>
&lt;tr&gt;&lt;td colspan=&quot;0&quot;&gt;&lt;/td&gt;&lt;? } ?&gt;<br>
&lt;/table&gt;</p>
</pre>

`

谢谢。

最佳答案

我建议您看一下 Codeigniter 的购物车类,它已经写得很好。没有太多必要继续重新发明轮子,但如果你愿意,你可以通过阅读他们的核心来做到这一点:)

Cart Class (Obviously, you can do shopping cart with it, lots tutorial available if you do some research

关于php - 从列表中选择/查看一行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14262555/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com