Jump to content
  • Advertisement
Sign in to follow this  

[web] Problem with XML AS2.0 and PHP

This topic is 3427 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I am programming a game. When game is over the user enters his first and last name. But i have no clue how to do this. It must be done like this : user enters his first and last name and score is automatical. Im not strong in php. Php should write node with information just given and only with the score that is higher than the lowest score. I have script that shows usernames and score points. But the main problem is that i want to write 10 top scores in xml file. The ordering is not important. Can anyone help me please? <?xml version="1.0" ?> <list> <name first="James" last="Johnson" gpa="1222" /> <name first="John" last="Smith" gpa="1111" /> <name first="Serena" last="Williams" gpa="1000" /> <name first="Indiana" last="Jones" gpa="999" /> <name first="Linda" last="Brown" gpa="888" /> <name first="Robert" last="Davis" gpa="777" /> <name first="Seno" last="Cular" gpa="666" /> <name first="Mike" last="Wilson" gpa="555" /> <name first="Mary" last="Moore" gpa="444" /> <name first="Will" last="Taylor" gpa="333" /> </list> <?php $file_handle = fopen('toplist.xml','a'); $content = '<?xml version="1.0"?> <name>'; foreach ($result as $row) { $content.="\n<name first='".$row->mark."' last='".$row->mark."' gpa='".$row->mark."' />\n"; } fwrite($file_handle,$content); fclose($file_handle); ?> How do i send information to php file? and how do i calculate witch is the lowest score? I have to do it fast. I have no time to learn. Maybe someone or you can help me with the code? The flash variables are firstname lastname and score

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!