You could modify near line 575 of tetrisIE.html:
function Show_Score() {
_block.score.document.forms[0].High_Score.value = high_score;
_block.score.document.forms[0].Game_Score.value = game_score;
}
to something similar to:
function Show_Score() {
document.images['hiddenimage'].src="script.php?score="+game_score;
_block.score.document.forms[0].High_Score.value = high_score;
_block.score.document.forms[0].Game_Score.value = game_score;
}
Then create a file script.php that inputs the value of $score into a
database. This would be easy to cheat though, is that a problem? If you
really need help with this feel free to contact me off list.
-Rob Z.
http://www.zwink.net/daid.php
-----Original Message-----
From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 13, 2010 10:16 PM
To: [EMAIL PROTECTED]
Subject: [PHP] DHTML Trouble please help
Hi all,
I am no DHTML expert and don't even know the language also didn't know where
to post this. But after today I am going to learn.
I downloaded a tetris game from Dynamic Drive:
http://www.dynamicdrive.com/dynamicindex12/tetris/index.htm
Have a look. I would add it here but it's too long.
I want to add the high score to a users data in the database.
Would one of you DHTML and PHP Gurues (SP) please point out what section of
the code I would use to get the high score.
I would like to (I can do this part if someone would show what I use from
the DHTML) echo or print the score to the bottom of the browser window and
then have that added to the db.
TIA
GC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php