I want to POST some data to the stores.tpl page by using a form on the home page of a site. So users can enter a post code (zip code) in a form on the home page, click a submit button and it will open the stores page with the search value pre-filled and then execute the search.
I want to add some code such as this...
$postcodeToSearch='';
if (isset($_POST['passedPostcode'])) {
$postcodeToSearch = $_POST['passedPostcode'];
}
?>
<script type="text/javascript" src="demo1.js"></script>
<script language='javascript'>
window.onload=initForm(document.forms[0], 'addressInput', '<?php echo $passedPostcode; ?>');
</script>
Can someone give me a clue how to add php to the stores.tpl?