Madmoggie Posted December 9, 2009 Share Posted December 9, 2009 Hey <?php $productid = $_GET['productid']; $type = $_GET['type']; $name = $_GET['name']; $description = $_GET['description']; $price = $_GET['price']; $quantity = $_GET['quantity']; $query = "SELECT * FROM product"; $result = $db->query($sql); $result = mysql_query ($query) or die ("Error in query: $query. ".mysql_error()); $output[] = '<tr>'; print "<table border = 4 >"; print " <tr><th>Type</th><th>Name</th><th>Description</th><th>Quantity</th><th>Price</th></tr>"; while ($row = mysql_fetch_array($result)) { print "<tr>"; print "<td>" . $row["type"] . "</td>"; print "<td>" . $row["name"] . "</td>"; print "<td>" . $row["description"] . "</td>"; print "<td>" . $row["quantity"] . "</td>"; print "<td>£" . $row["price"]. "</td>"; print "<td>" . $row["!!!!!!!!!!"] "</td>"; print "</tr>"; } print "</table>"; echo join('',$output); ?> Where the !!!!!!! are i need this link - <a href="cart.php?action=add&id='.$row['id'].'">Add to cart</a> But when i put it in all the "" get mixed up - someone please help Manythanks Quote Link to comment Share on other sites More sharing options...
forumforme123 Posted December 9, 2009 Share Posted December 9, 2009 try this: print "<td> <a href='cart.php?action=add&id=" .$row['id']. "'>Add to cart</a></td>"; Quote Link to comment Share on other sites More sharing options...
Madmoggie Posted December 9, 2009 Author Share Posted December 9, 2009 Thank you sooo much! i spent hours trying to work it out! lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.