Links with parameters in DB

From: Date: Thu, 19 Aug 2004 12:01:04 +0000
Subject: Links with parameters in DB
Groups: php.general 
Request: Send a blank email to php-general+get-194241@lists.php.net to get a copy of this message
Hi!! I have links saved in the DB and some of them may have parameters. Those parameters may come from a php variable. The problem is that when I recover the link form the DB I get the link plus the name of the variable instead of its value. Here is an example: I have this in the DB: -------------------------------------------- | Link | -------------------------------------------- | orders.php?idorder=$idorder | -------------------------------------------- And the code: (Suposed idorder=5) ...... Connect to the DB ...... $link=eval(mysql_result($result,$i,"link")); ..... ..... and then i put this: <a href="<?=$link?>">Link to order</a> But what i see the link i see this: orders.php?idorder=$idorder Instead of: orders.php?idorder=5 What am I doing wrong? I´m despearte, Help please!!!! Thanks in advance ;)

« previous php.general (#194241) next »