Help - Search - Members - Calendar
Full Version: How do you capture data for insert into MySQL?
Hostony Board > General Support > General Support
Matthew
I have four respresentative data variables that I want to capture and insert into a MySLQ database. The first I can do so without problems. I am not sure how to combine this with the other three. Also, some of this data is client-side and not server-side. Is it possible to declare the client-side variable and then pass it back to the server when the next page is selected on the Web site? I want to capture these representative items and others into a log file. I am using ASP and not PHP.

1. Request.ServerVariables("http_user_agent") [already able to insert this]

2. script language=javascript>
document.write(window.screen.width);</script> [not sure how to capture and pass this back for insertion into my database table]

3. <script language="Javascript" src="http://www.ip2phrase.com/ip2phrase.asp?template=<CITY>."></script> [not sure how to capture and pass this back for insertion into my database table]

4. <script>var times=history.length; document.write(times); </SCRIPT> [not sure how to capture and pass this back for insertion into my database table]

I guess my problem is (1) getting the data defined as a variable, (2) getting it back to the server, and (3) calling up each in a MySQL insert statement.

Thanks,
Matthew
jfmathieu
Hi,
The pricipal problem is that the data that you ask is client side.

Solution possible at first sight :
1. If you post back after. Store the data in hidden field.
2. Use javascript to call a back en script to do the transaction

You can go on http://jibbering.com/2002/4/httprequest.html and use httpRequest with javascript to get bask data to the database.

The more simple solution will be the post bask

Hope it help
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here