[SOLVED] Storing variable names in a MySQL DB
Posted: Fri Feb 23, 2007 5:38 am
Hello.
At the minute I'm storing a line similar to:
"Dear $title $fName[0] $sName, Can you confirm your email address is $email".
And then I have in a PHP page dropdown box where the value of an option is equal to the above line. I then have some Javascript which echo's out the value of the dropdown selection. The variables, $title, $fName & $sName already exist in the code, so I want it to print the contents of those 3 variables but it's not. It's printing the variable names.
How would it be possible for a loop that creates a dropdown list to echo the contents of a variable in the dropdown value?
At the minute I'm storing a line similar to:
"Dear $title $fName[0] $sName, Can you confirm your email address is $email".
And then I have in a PHP page dropdown box where the value of an option is equal to the above line. I then have some Javascript which echo's out the value of the dropdown selection. The variables, $title, $fName & $sName already exist in the code, so I want it to print the contents of those 3 variables but it's not. It's printing the variable names.
How would it be possible for a loop that creates a dropdown list to echo the contents of a variable in the dropdown value?