This topic is locked

Adding predefined variables to database

12/3/2007 12:47:03 PM
PHPRunner General questions
C
cjb author

I am trying to add the website URL as a field in the record I am adding to my database as this form can appear on a number of websites and I need to know which site the frm was filled in on.
I can get the information by doing:- echo $HTTP_HOST, $REQUEST_URI but I can't get this into phprunner. Can you give me the right format to input this data please?

J
Jane 12/4/2007

Hi,
you can use your variables as default values on the "Edit as" settings dialog on the Visual Editor tab.

C
cjb author 12/8/2007

Thanks Jane. That does work but I would then need to hide the display as there is no need for the user to see this information. I found an answer Alexey gave to a hidden fields problem back in November 06 and experimented with this until I got exactly what I wanted. The final code is :-
$values["signupurl"]=$_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI'];
which goes in the BeforeAdd function.