Re: newbie about passing value
| From: | Marek Kilimajer | Date: | Tue, 30 Sep 2003 10:44:11 +0000 |
| Subject: | Re: newbie about passing value | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164367@lists.php.net to get a copy of this message | ||
register_globals off?
What if you hardcode
$id=$_GET['id'];
??
Ben Johnson wrote:
Hi, Why is the product_details.php is not getting the id value properly. In the URL it is showing id=1 with along with the correction location and file name. But the page is not getting displayed. <table cellspacing=1 cellpadding=5> <tr bgcolor=#cccccc><td class=label nowrap>On-Special</td></tr> <tr bgcolor=#cccccc><td class=normal> <? while ($r = db_fetch_object($qid)) { ?> <p><b><a href="<?=$CFG->wwwroot?>/shopping/product_details.php?id=<?=$r->id?>"><?=$r->name?></a></b> <br><?=$r->description?> <br>$<?=$r->price?> <br>[<a href="<?=$CFG->wwwroot?>/shopping/cart_add.php?id=<?=$r->id?>">+ Add to cart</a>] <? } ?> </td></tr> </table> But when I hard coded the id as $id=1 in product_details.php the page with item displayed correctly. Please help I am on W2k with PHP 4.3.2, MySql and Apache 1.X Thank you Ben ___________________________________________________ Art meets Anesthesia; Shefali Weds Dr. Raman. Rediff Matchmaker strikes another interesting match !! Visit http://matchmaker.rediff.com?1