Passing PHP values - Post ID 254956
Hi,
I need to pass php value into hidden field of WFB form, however it doesn't work at all (passing value within index.php works like a charm). Please find out all information below:
1. Prefix of index.php
<?php
require_once("/var/www/html/bast3k/slpw/slloginform.php");
$groupswithaccess="PUBLIC";
$loginpage=$slpagename;
$logoutpage=$slpagename;
$loginredirect=0;
require_once("/var/www/html/bast3k/slpw/sitelokpw.php");
?>
2. Rest of index.php
<?php if (!$slpublicaccess) { ?>Welcome <b><?php echo $slusername; ?></b> .
<?php } ?> - it works like a charm
and here the form is embedded
<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\" src=\"loty.php" + window.location.search + "\" width=\"600\" height=\"932\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E<a href=\"loty.php\" title=\"loty\">Check out my CoffeeCup Form</a>%3C/iframe%3E"));</script>
<noscript>
<iframe width="600" height="932" style="border:none; background:transparent; overflow:hidden;"
id="fb_iframe" src="loty/loty.html">
<a href="loty.php" title="loty">Check out my CoffeeCup Form</a>
</iframe>
</noscript>
3. changed ascii codes in form.html (during manual export, WFB changes <? and ?> into ASCII, that's why it needs to be changed
<input type="hidden" name="email" value="<?php echo $slusername; ?>;"
What to do else to pass php variables into form?
Thanks in advance for your help here.
Cheers,
I need to pass php value into hidden field of WFB form, however it doesn't work at all (passing value within index.php works like a charm). Please find out all information below:
1. Prefix of index.php
<?php
require_once("/var/www/html/bast3k/slpw/slloginform.php");
$groupswithaccess="PUBLIC";
$loginpage=$slpagename;
$logoutpage=$slpagename;
$loginredirect=0;
require_once("/var/www/html/bast3k/slpw/sitelokpw.php");
?>
2. Rest of index.php
<?php if (!$slpublicaccess) { ?>Welcome <b><?php echo $slusername; ?></b> .
<?php } ?> - it works like a charm
and here the form is embedded
<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\" src=\"loty.php" + window.location.search + "\" width=\"600\" height=\"932\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E<a href=\"loty.php\" title=\"loty\">Check out my CoffeeCup Form</a>%3C/iframe%3E"));</script>
<noscript>
<iframe width="600" height="932" style="border:none; background:transparent; overflow:hidden;"
id="fb_iframe" src="loty/loty.html">
<a href="loty.php" title="loty">Check out my CoffeeCup Form</a>
</iframe>
</noscript>
3. changed ascii codes in form.html (during manual export, WFB changes <? and ?> into ASCII, that's why it needs to be changed
<input type="hidden" name="email" value="<?php echo $slusername; ?>;"
What to do else to pass php variables into form?
Thanks in advance for your help here.
Cheers,
Remove the script surrounding the form iframe code.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Hi, still doesn't work. I left following code:
<iframe width="600" height="932" style="border:none; background:transparent; overflow:hidden;"
id="fb_iframe" src="loty/loty.html">
<a href="loty.php" title="loty">Check out my CoffeeCup Form</a>
</iframe>
maybe *.html is not parsing php?
<iframe width="600" height="932" style="border:none; background:transparent; overflow:hidden;"
id="fb_iframe" src="loty/loty.html">
<a href="loty.php" title="loty">Check out my CoffeeCup Form</a>
</iframe>
maybe *.html is not parsing php?
I've made following change in /etc/httpd/conf.d/php.conf:
<FilesMatch "\.(htm|html|php)$">
SetHandler application/x-httpd-php
</FilesMatch>
now, I can execute php code within .html file, however <?php echo $slusername; ?> value is still empty. What should I try next?
<FilesMatch "\.(htm|html|php)$">
SetHandler application/x-httpd-php
</FilesMatch>
now, I can execute php code within .html file, however <?php echo $slusername; ?> value is still empty. What should I try next?
I added php require_once function into .html and it works like a charm.
cheers
cheers
sebastian.szumczyk wrote:
I added php require_once function into .html and it works like a charm.
cheers
I added php require_once function into .html and it works like a charm.
cheers
Where did you add this?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.