Question about Forms and Scripts

liunx

Guest
I currently have an HTML page that uses a cgi Search feature. I want to log the search words that users enter when the hit the Search button. I can't figure out where to insert a second "Form" to call the PHP script that will log the search entry to a txt file. I have that portion working but I can't get it to work on the same page as my search page.<br />
<br />
Here is the Form section of my search:<br />
<form method="post" action="/cgi-bin/htsearch"> <br />
<input type="hidden" name="exclude" value=""><br />
<input type="hidden" name="restrict" value=""><br />
<input type="hidden" name="config" value="htdig"><br />
Search:<br />
<input type="text" size="30" name="words" value=""><br />
<input type="submit" value="Search"><br />
</form><br />
<br />
I need to include this code to call the script that will log it to a text file (PhormJr script).<br />
<br />
<form method="post" action="/cgi-bin/phormjr.php3"> <br />
<INPUT TYPE="HIDDEN" NAME="PHORM_NAME" VALUE="logsearch"><br />
</form><br />
<br />
<br />
I need to pass the variable "words" to the phormjr.php3 script. I can get the script to work as a stand alone test but I want to include it in the search form above, can anyone help or give me some pointers?<!--content-->You could make the form to go to the log (phormjr.php3) file, and from there redirect the user to the actual search page maybe?<!--content-->one or the other, you can't have both form actions work at the same time. unless you put the scripts together to make one script than it will work, but since one is cgi and the other php, good luck.<!--content-->
 
Back
Top