Reputation: 69
I am running a opencart based website (ver 3.0.2.0). I have a custom form included in footer.twig file through iframe
<iframe class="frameDiv" src="index.php?route=common/sticky_form"></iframe>
In that Form, I am posting to different domain
<form action="https://domaintwo.tld/enquiry/mini_enquiry_mail.php" method="post" onSubmit="return quick_noempty();">
<div class="mini-q-enq-form-top">
<input type="text" style="position:absolute; top:-99999px; left:-9999px;" name="user_name" value="">
<input type="hidden" name="ip" id="ip" value="<?php echo $ip ?>" />
<textarea name="desc" id="quick_desc" rows="20" style="height:65px;" placeholder="Enter your requirement in detail"></textarea>
</div>
<div class="mini-q-enq-form-top">
<input type="text" name="name" id="quick_name" placeholder="Name"/>
<!--<input type="text" name="email" id="quick_email" onblur="quickcheckEmail(this.value);" placeholder="Email" />-->
<input type="text" name="email" id="quick_email" placeholder="Email" />
<input type="text" name="phone" id="quick_phone" onKeyPress="return isNumberKey(event);" placeholder="Phone" />
<input type="text" name="location" id="quick_location" placeholder="Location" />
</div>
<div class="mini-q-form-btm">
<img draggable="false" src="<?php echo contactFormRoot; ?>/CaptchaSecurityImages.php?security=<?php echo base64_encode($code);?>" class="cptcha-img" style="float:left" alt="captcha"/>
<input name="captcha_text" type="text" id="quick_verify_code" class="captcha-text" Placeholder="Code" maxlength="3" onKeyPress="return isNumberKey(event);" />
<input type="hidden" name="website" id="website" value="<?php echo $website;?>" />
<input name="quick_btnsubmit" type="submit" value="Submit" />
<div class="clear"></div>
</div>
</form>
When i tried to print the posted value in mini_enquiry_mail.php, I am getting empty array
My HT Access file contains below directives
#HTTP to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_METHOD} !POST [NC]
RewriteRule ^(.*)$ https://www.domain.tld/$1 [R=301,L,NE]
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/storage/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
I think that there is problem with HT access. Since earlier it was working fine. Only after SSL implementation and changing HT access, Form data is not getting posted. Please Help in resolving the issue.
Upvotes: 0
Views: 53