Herbert
Herbert

Reputation: 25

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>&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>

`

Thanks.

Upvotes: 1

Views: 400

Answers (1)

weia design
weia design

Reputation: 1330

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

Upvotes: 0

Related Questions