Forum Moderators: open

Message Too Old, No Replies

form post and database table insert command

         

dertyfern

1:16 pm on Aug 3, 2009 (gmt 0)

10+ Year Member



I'm trying to submit a form post from my website to another, which works, but need to insert a row into a database table before hand when the submit button is pressed.

The form is in an aspx file and reads like:

<form id="myform" name="myform" action="http://somesite.com/index.asp" method="post" onSubmit="return validate(this);" style="margin:0px;">

Anyone have any experience in calling to actions on a form submit or any other solution?

Ocean10000

5:59 pm on Aug 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Lets see if I can explain what I think you are trying to do.

You currently have two websites, Website 1 and Website 2. You have this form on website 1. And when this form is submitted needs to create a record (on website 1) and still submit the form to website 2.

My question is what is website 2 doing with the data that is being submitted to it. Is it only a landing page or is it going to do some further processing of the data?

If it is simply a landing page a response.redirect will work, allowing you to create your record then redirect it to the second website.

But if it is the later, it will be trickier depending on what data it needs to process by website 1 and website 2.

dertyfern

6:26 pm on Aug 3, 2009 (gmt 0)

10+ Year Member



I'm not too good with the techno talk so thanks for simplifying all.

Website 1 belongs to me, website 2 doesn't but the form on my site belongs to them. Website 2 is processing the data and eventually provides a search result set.

I want to store some of website 1's SE referral data in a table before I send the user off to website 2.

Ocean10000

7:27 pm on Aug 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If all you want is the referrer data, you can simply look at the website log files to gather this information. Referrer data is almost always saved in the website log files. Another possibility is just to use Google Analytics on website 1, which can gather this information for you as well and provide you other relevant information in a easy to understand package.

dertyfern

7:33 pm on Aug 3, 2009 (gmt 0)

10+ Year Member



That's what I've been doing but it gets tougher as volume increases. Adding a record to a table simplifies the task quite a bit.

Ocean10000

10:53 pm on Aug 3, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



How much volume are you talking about?

You could create something vary similar to how Google Gathers the data and still achive your record insertion.

By creating a simple asp page that checks the referrer information and saves it to a db, and then simply sends a transparent 1x1 pixel gif as the response. And reference this page via an standard image tag or via javascript.

dertyfern

5:22 pm on Aug 4, 2009 (gmt 0)

10+ Year Member



Ok, thanks for the input. I'm going to try a few options and figure out which works best.