Forums

Variables not being evaluated properly

sberry 31 Aug, 2009
In the body of my CC form, I am trying to set a number of variables.


<strong>{location}:</strong><?php echo ' ' . $old_loc ;?><br />
<?php
$old_loc = '{location}';
?>


Of course, the first time through, the variable $old_loc is not set, but after this, it should hold the previous value of {location}. It's doesn't. It holds the current value of {location}.

I have been working on this for hours and I just can't seem to figure out WHY it's not working, and what to do to get it to work.

Is anyone else having this problem? Does anyone have any ideas on what to do?

Thanks for your help.

Steve
GreyHead 31 Aug, 2009
Hi Steve,

I would expect this to work. I guess that the problem must be in the execution order. I'll need to take a look with a cold towel to try to work it out.

Bob
This topic is locked and no more replies can be posted.