Results 1 to 4 of 4
Thread: Javascript-MySQL Interaction
-
07-25-2005, 04:27 AM #1Junior Guru Wannabe
- Join Date
- May 2003
- Location
- U.P. Diliman, Philippines
- Posts
- 41
Javascript-MySQL Interaction
Is it possible to create a _javascript include file that inserts into a MySQL database where one needs to be called from a hyperlink and another for the pages load (impressions) and take the following parameters?
Id
CountryId / Name
Date
Action (Click, Impression) - Just a number that will be aligned with the action
Media (Text, Banner, Small Image, Large Image) - Just a number that will be aligned with the media
UserIP - The users ip address
Also, is it possible for this _javascript to create a log that is read daily and then emptied?
-
07-25-2005, 07:31 AM #2AWS Developer GCP AZURE Devops
- Join Date
- Dec 2002
- Location
- India
- Posts
- 1,433
One way is for
javascript --> php script residing in server --> accomplish what you want to doChris, Developer/Programmer,
https://www.chrisranjana.com/
Php laravel developers, Node Python developers,
AWS Certified | Python developers | Nodejs Developers | Devops
-
07-25-2005, 10:08 AM #3Web Hosting Evangelist
- Join Date
- Mar 2004
- Location
- New Zealand
- Posts
- 532
Javascript is client side (well, typically, but lets not get into that). MySQL is server side.
There can be no *direct* interaction between them, interaction must go through the browser to a server side reciever into mysql and back again.
I'd use
Javascript <-> XMLHTTPRequest <-> PHP <-> MySQL
you could also use the traditional
Javascript <-> iframe/frameset "pipe" <-> PHP <-> MySQL
or substitue your favourite language for PHP
-
07-25-2005, 12:52 PM #4Junior Guru
- Join Date
- Mar 2005
- Posts
- 214
i hear theres an activexobject that does mysql commands but its like 10 lines just to connect and another 5 to select a database but i cant remember the url i found it at.