PDA

View Full Version : this is an unusual forms and posting--



antonyf
10-22-2011, 12:27 AM
Hi,
This is my setup:
i use pat-templates, so i run all my queries on a .php page and out to .html page..
My search function is like so:
i have
sitesearch.class.php,
search.php,
search.html.

sitesearch.php creates all the dropdowns and user input and outputs to the search.html, the search.php which is used to run queries for user input
and out puts the page to another .html file

Now in the sitesearch.php i have echoed a form which allows the user to pre-select search functions which pass to the search.php, so the .html will show only whats relevant to the site users search..IE: lang files, and dropdowns.. if they search for a female gender, the dropdowns are specific to the female gender, and so on and so on..

What i got is working, however the link that the form posts to is also used by another module on my site and now that module does not work. (i have created sef urls).. i cant change this ..

What i need is for the form to post pack to itself or for the one form to post to the other ?? from a postback.php file //maybe or if there is a better method?? i just dont want the url to show in the address bar..
here is a sample of my code:

//this is on my sitesearch.php file



<?php

some php code here that calls to my site functions

?>

<br><form method="post" action="???">
<center><table width="50%" style="border:1px solid #444444">
<tbody><tr><td colspan="1">Gender:</td><td colspan="1"><select name="searchgender" id="searchgender" class="inputbox">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select></td></tr><tr><td colspan="2" style="text-align:right"><input type="image" value="Submit" name="Submit" alt="Submit" src="http://www.link_to_image.png">
<input type="hidden" value="1" name="postintegratedsearch"></td></tr>
</tbody></table></center>
</form>
<?php

init_javascript();
if ($calledBySearchModule == "" && isset($_REQUEST['calledBySearchModule']) )
{
$calledBySearchModule=myappGetParam( $_REQUEST, 'calledBySearchModule',"" );
}
if ($calledBySearchModule == "" && !isset($_REQUEST['next']) )
{
if ($_POST['postintegratedsearch'] == '1' && $jrConfig['integratedSearch_enable'] =='1')
{
$calledBySearchModule="mod_appsearch_a0";
}

}
more php here -- here i have all the database dropdowns with if ($_POST['searchgender'] == 'Male') and also ($_POST['searchgender'] == 'Female')

Then what is required is passed to the search.php and output to the html
?>