Posted By
|
Message
|
RapidFlash Savior of the Universe
Registered 14/05/2002
Points 2712
|
2nd August, 2003 at 09:23:03 -
Is it possible to make a download counter in html?
http://www.klik-me.com
|
Long John Kickbag
Registered 26/08/2002
Points 148
|
2nd August, 2003 at 12:09:54 -
No, HTML is a document format and it is only really looked at on the client side (in your web-browser) so it wouldn't be able to do anything on the server.
Resize! - www.clicksplat.com/comparison.html
|
ShadowCaster Possibly Insane
Registered 02/01/2002
Points 2203
|
2nd August, 2003 at 21:05:28 -
HTML, Java and JavaScript are all client-side, meaning they cant do anything on the server (for example, edit files). PHP, ASP, Perl and Bash are all server-side, so they can do things on the server as well as client-side.
Noodle: Simply open up My Documents (or wherever) and select File -> New -> Text Document and call it "something.php". You can then use Notepad to insert the script. If you have Windows XP or if you have downloaded Apache you can run it on your computer to test it, but if you dont, then you'll need to upload it to your server in order to test it after you make any changes.
Basically what the server does is it sees the user is trying to access a page with a .php extension. It doesnt do any processing, but instead passes it to the PHP interpreter. The PHP interpreter sends everything back to the HTML interpreter except anything that is contained within the <? and ?> tags.
So in essence you can have things like this:
<HTML>
<BODY>
<?
echo("hello!");
?>
</BODY>
</HTML>
or you can even have things like this:
<HTML>
<BODY>
<?
if($_REQUEST["name"] == "Michael")
{
?>
Hello, Michael!
<?
}
else
{
?>
Hello, Stranger!
<?
}
?>
</BODY>
</HTML>
This example will print "Hello, Michael" if the user has specified their name as Michael in a form, or if their name isnt Michael, it will print "Hello, Stranger". So you can see the parts of code inside the <? and ?> tags arent the only parts to be affected by the PHP interpreter.
Mike
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert
|
|
|