Page 1 of 1

Echo Table

Posted: Mon Jan 30, 2012 9:53 pm
by OoZI
Hey guys, I am working on my game and I am trying to make the battle page. I want it to show all of the enemies and there stats with an attack button.

How would I echo my MySQL Table with a battle option in each row so when you hit the button for that row, it puts you in a battle against that enemy?

Re: Echo Table

Posted: Mon Jan 30, 2012 11:00 pm
by Nexus
You would do it the same way as you get everything in a shop using a while loop

Code: Select all

while($creatureget3 = mysql_fetch_array($creatureget2){echo your table as you would a shop but with rows for attack, defense, etc}
as for selecting a certain creature I am sure you could transfer their choice throught the url with a $_GET (I am on my ipod or else I would type it out for you :))