icefire Posted June 3, 2010 Share Posted June 3, 2010 can any body tell me what is the problem in this page cuz the products doesnt appear [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
beta0x64 Posted June 3, 2010 Share Posted June 3, 2010 <table border="0" cellpadding="2px" width="600px"> <?php $result=mysql_query("SELECT * FROM products"); while($row=mysql_fetch_array($result)){ ?> <tr> <td><img src="<?php $row['picture'] ?>" /></td> <td> <b><?php $row['name'] ?></b><br /> <?php $row['description'] ?><br /> Price:<big style="color:green">$ <?php $row['price'] ?></big><br /><br /> <input type="button" value="Add to Cart" onclick="addtocart(<?php $row['serial']?>)" /> </td> </tr> <tr><td colspan="2"><hr size="1" /></td> You should either use the notation <?php=$row['price']?> or use echo $row['price'], because all this does is reference the variable $row with a key, but not do anything with it. Whatever is echo'd or print'd to the user is what is displayed as HTML. Everything else is processed before the page loads. So yea. Replace those with something sensible! Quote Link to comment Share on other sites More sharing options...
icefire Posted June 3, 2010 Author Share Posted June 3, 2010 lol thanx 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.