+ Reply to Thread
Results 1 to 4 of 4

Thread: onMouse php event question

  1. #1
    nightscream is offline x10 Lieutenant nightscream is an unknown quantity at this point
    Join Date
    Feb 2006
    Location
    Hallaar, Belgium
    Posts
    474

    onMouse php event question

    i got a problem
    i want to create a counter how many times something is downloaded(link clicked)
    my code
    HTML Code:
     onMouse="php file"
    but how can I let it do the action that is in the php file?
    Last edited by nightscream; 06-24-2006 at 07:02 AM.
    ------------------------------------------------------------------------------------------
    If you have any troubles with a website or a script, just send me a pm.

    I also code websites in xHTML/css, can code javascript and php too if needed

  2. #2
    Conor's Avatar
    Conor is offline Lord Of The Keys Conor is an unknown quantity at this point
    Join Date
    Jan 2005
    Location
    Toronto
    Posts
    1,785

    Re: onMouse php event question

    Well I don't know PHP very well but I do know Action Script.

    Wouldn't you create a function that tells the script to release that PHP event when the link is clicked?

  3. #3
    The_Magistrate's Avatar
    The_Magistrate is offline x10 Elder The_Magistrate is an unknown quantity at this point
    Join Date
    May 2005
    Location
    PA
    Posts
    559

    Re: onMouse php event question

    You wouldn't use the onMouse event to capture clicks for a download counter. You would point a normal link to the PHP file and perform the counter actions in the PHP. This allows you to store the number of clicks in a text file/database on the server. One the click is counted, you redirect the client to the actual file they want to download. Use this PHP to do the redirect:

    PHP Code:
    Header("Location: $url"); 
    Note, you cannot send any data to the client before you do the redirect or you'll get an error about the headers already being sent.
    Getting Started | Terms of Service | Paid Hosting | Forum Rules | Free Server Status | Banned Countries

    If I have helped you through one of my posts, please click the
    blue checkbox on the right below my avatar to add to my reputation.

  4. #4
    nightscream is offline x10 Lieutenant nightscream is an unknown quantity at this point
    Join Date
    Feb 2006
    Location
    Hallaar, Belgium
    Posts
    474

    Re: onMouse php event question

    I linked it
    now it works thanks
    ------------------------------------------------------------------------------------------
    If you have any troubles with a website or a script, just send me a pm.

    I also code websites in xHTML/css, can code javascript and php too if needed

+ Reply to Thread

Similar Threads

  1. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  2. tons of PHP Resources
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 01-16-2009, 10:07 AM
  3. Unstand PHP?
    By o0slowpaul0o in forum Tutorials
    Replies: 8
    Last Post: 01-07-2008, 09:16 PM
  4. http access and php read/write permissions.... one question !!
    By careerbridge in forum Scripts & 3rd Party Apps
    Replies: 8
    Last Post: 06-18-2006, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers