Problems replacing a variable name for its value in a string
Posted: Fri Feb 15, 2008 7:19 am
Hi,
I've had problemas with an issuea and I don't know if you could help me. I have a lot of telnet commands stored in a table on my DB and several users of my system are creating many more commands all the time.
This Telnet commands have the following notation on the database: nat mapdelete index=$indx (Just to give you a simple example).
On my php script, I give a value for the variable $indx (for example $indx=10) and then I extract this commands using a SQL query, but when I try to execute those commands, instead of executing nat mapdelete index=10, my command stays the way it was on my BD; that is nat mapdelete index=$indx.
Does somebody have had the same problem? Could you help me with this issue?
Cheers
I've had problemas with an issuea and I don't know if you could help me. I have a lot of telnet commands stored in a table on my DB and several users of my system are creating many more commands all the time.
This Telnet commands have the following notation on the database: nat mapdelete index=$indx (Just to give you a simple example).
On my php script, I give a value for the variable $indx (for example $indx=10) and then I extract this commands using a SQL query, but when I try to execute those commands, instead of executing nat mapdelete index=10, my command stays the way it was on my BD; that is nat mapdelete index=$indx.
Does somebody have had the same problem? Could you help me with this issue?
Cheers