August 31, 20188 yr I have added the following code to the page https://magento.kellyseye.com/ <div class="top-content-text cf m-all t-1of2 d-1of2 first"> <h3>Store Login</h3> <div class="block block-login"><form action="https://cashino.kellyseye.com/customer/account/loginPost/" method="post"> <div class="block-content"><input id="mini-login" class="input-text" spellcheck="false" type="email" placeholder="Email:" name="login[username]" /> <input id="mini-password" class="input-text" type="password" placeholder="Password:" name="login[password]" /> <input type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ? >" name="form_key" /> <div class="actions"><button class="button" type="submit"> <span> <span>Login</span> </span> </button></div> </div> </form></div> </div> </div> Unfortunately, when I enter my credentials and click "Login", I am redirected to the login page, where I have to add my credentials once again. On other pages for example https://beaconbingo.kellyseye.com/ I have no problem logging in from the form on the homepage. Why is this?
August 31, 20188 yr Mate it's your key again, inspecting in Chrome your php is outputting to the page on beacon; <input type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" name="form_key"> and on your example above; <input type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" name="form_key" /> it has the special characters turned to html! <?php $something = Mage::getSingleton('core/session')->getFormKey(); echo $something; ?> What does that echo?
September 2, 20188 yr <input type="hidden" value="<?=Mage::getSingleton('core/session')->getFormKey()?>" name="form_key" />
Create an account or sign in to comment