Hello All,
I have a webpage on my webhost server. The page is hello.php
This page contains php and javascript codes.
I have 7 javascript codes for linking to my other webpages on the same server.
This is just one of seven:
[code]<?php print "Click here for Seal History
";?>
What I need to do is, create a random number between 100-999 in php within the win1() function before the clicked page opens. I do not want the server to create this number unless the win1() function has been called by clicking on the “Click here for Seal History” link.
I have put other php scripts within the win1() function and the server has processed them even when the link was not clicked.
I then need to take the 3 digit random number and make it a filename ie 794.txt
I then need to open this file on my webhost server, write a “1” to the file, then close the file.
This all must be done within the win1() function only when the link is clicked.
Is there any php code that will do what I need.?
Cheers