Results 1 to 4 of 4
  1. #1
    Join Date
    May 2003
    U.P. Diliman, Philippines

    Question 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?

    CountryId / Name
    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?

  2. #2
    Join Date
    Dec 2002
    chennai , tamil nadu , IN
    One way is for

    javascript --> php script residing in server --> accomplish what you want to do
    Chris, Developer/Programmer,
    Php laravel developers,
    Ruby on Rails developers,

  3. #3
    Join Date
    Mar 2004
    New Zealand
    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

  4. #4
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts