Forum Moderators: coopster & phranque

Message Too Old, No Replies

Now to do 2 things with one form

with or without cgi.

         

mack

5:55 pm on May 16, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi there.
On my site I have a seach box that can query 3 databases. The way it works is....

User carries out a search and checks a check box for whatever database they wish to search. All queries are them sent to one script. And depending on what check box was checked the script re-forms the query and sends it on to the relevant database. This is required because all three databases use a different query string but must all come from the same search box.

What I want to do is log all queries, reguardles of what checkbox is checked. Is it possible to have the form send the info to two diffeent locations. One to handle the query and one to log it. Or would I be better to hack the existing cgi to record to a file using fopen

Thanks for your help.

Mack.

dmorison

6:02 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would hack the existing CGI.

There are things you can do with JavaScript but it would be ugly and puts reliance on JavaScript at your client.

Alternatively, I think you can process the POST information and then send the browser a 302 (page moved) to the second script. IE handles this begrudgingly because it just went to the bother of POSTing it where it was told - i'm not sure how this stands standards wise.

mack

6:05 pm on May 16, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi there, thanks for the reply.

I think youre right about using the existing script. It seams logical.

It woudl be great to be able to simply use both locations in the form fields but I cant see this working.