Hi, I have a problem on migrating a form from v 6.0.19. to v 6.1.4 (Designer mode: classic)
Into hidden field I put the following php script
Name: cf_http_user_agent
Value: <?php echo $_SERVER['HTTP_USER_AGENT']; ?>
Save to database ON
Name: refsite
Value: <?php if (!empty($_GET['refsite'])) echo $_GET['refsite']; else echo $_SERVER[HTTP_HOST]; ?>
Save to database ON
well... the old version works perfectly. The new one save the script itself.
Help me, please.
Into hidden field I put the following php script
Name: cf_http_user_agent
Value: <?php echo $_SERVER['HTTP_USER_AGENT']; ?>
Save to database ON
Name: refsite
Value: <?php if (!empty($_GET['refsite'])) echo $_GET['refsite']; else echo $_SERVER[HTTP_HOST]; ?>
Save to database ON
well... the old version works perfectly. The new one save the script itself.
Help me, please.
I need to store into DB the refsite parameter that I pass with GET method to the form and useragent
Solved myself.
I created 2 new events into onload section with PHP module
one named:
http_host
return $_SERVER[HTTP_HOST];
the other
http_user_agent
return $_SERVER['HTTP_USER_AGENT'];
then into two hidden field, I insert the following values
refsite
{data:refsite/(var:http_host)}
http_user_agent
{var:http_user_agent}
The question is... is there a way to retrieve $_SERVER[HTTP_HOST], directly from design fields, without create a variable on setup tab before?
I created 2 new events into onload section with PHP module
one named:
http_host
return $_SERVER[HTTP_HOST];
the other
http_user_agent
return $_SERVER['HTTP_USER_AGENT'];
then into two hidden field, I insert the following values
refsite
{data:refsite/(var:http_host)}
http_user_agent
{var:http_user_agent}
The question is... is there a way to retrieve $_SERVER[HTTP_HOST], directly from design fields, without create a variable on setup tab before?
Hi indiana,
No, you did it the right way!
Best regards
No, you did it the right way!
Best regards
This topic is locked and no more replies can be posted.