Magento – form post – getURL secure (HTTPS / SSL)

controllershttpsmagento-1securessl

There is a form post, it sends data without secure URL (HTTP):

<form id="answer_form_<?php echo $id;?>" class="form" method="post" action="<?php echo Mage::getUrl('productquestions/productquestions/saveanswers',array('product_questions_id'=>$id));?>">

How can I change it, so it posts with SSL (HTTPS) ?

Best Answer

You can do so by using the _secure parameter:

<?php echo Mage::getUrl('productquestions/productquestions/saveanswers',array('product_questions_id'=>$id, '_secure' => true));?>
Related Topic