I have a problem.
My website is running an SSL on the checkout page. This is the current message I get.
The page at ‘https://jonathanmichael.co.uk/checkout/‘ was loaded over
HTTPS, but is submitting data to an insecure location at
‘http://jonathanmichael.co.uk/‘: this content should also be submitted
over HTTPS.
<form action="http://jonathanmichael.co.uk/" method="get" id="adminbarsearch"><input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150"><input type="submit" class="adminbar-button" value="Search"></form>
My question is how do I fix this? I’m using WordPress, I have found this code which I think links to it.
searchform.php
<!-- Start SearchForm -->
<form method="get" class="searchform" role="search" action="<?php echo home_url(); ?>/">
<fieldset>
<input name="s" type="text" id="s" placeholder="<?php _e( 'Search', THB_THEME_NAME ); ?>" class="small-12">
</fieldset>
</form>
<!-- End SearchForm -->
I have zero knowledge of PHP for help would be appreciated.
Thanks!
Easy. Just explicitly change the form action to:
Also, please use $_POST for your form.
$_GET should not be used for anything that is supposed to be secure.
You need to pass the
$scheme
parameter to the call tohome_url()
This will let you generate the link with the
https:\
prefix.See the documentation: http://codex.wordpress.org/Function_Reference/home_url