Posted by Evert | Rooftop on 05/16/05 00:22
Shouldn't that be:
eval("echo \"$string\"");
its pretty insecure though, be sure your users are not allowed to change
the db field, because they can do some serious damage.
grt,
Evert
Krid wrote:
> Hi!
> Try
> eval("echo $string");
>
> blackwater dev wrote:
>
>> Hello,
>>
>> this works fine:
>>
>> $name="fido";
>> $string="my dog's name is $name";
>> echo $string;//prints my dog's name is fido
>>
>> but when I store the string "my dog's name is $name" in the db and
>> pull it out:
>>
>> //do the query
>> $row=$datab->fetch();
>> $name="fido";
>> $string=$name['db_column'];
>> echo $string//prints my dog's name is $name
>>
>> How can I get it to work with the db?
>>
>> Thanks!
>>
>
[Back to original message]
|