Jump to content

A PHP inventry sort of thing


9homie

Recommended Posts

Hello.

 

I am making a pokemon game called Pokemon Oracle and I am wondering if anyone can help me.

I want, when the person catches a Pokemon, then it goes into his team or his computer. So I don't know how to write the code to make this happen.

 

If you go on: http://pokemonoracle.web44.net/mapcode.php (then click the map to start it up)

 

then you can see what you have to do to get a pokemon. Now when you click the Capture button, I want what I have been saying to happen, they capture it and then it goes to their team, IF they do not have any room in their team, then it goes to their computer.

 

So can anyone help me with this project?

 

Thank You

9homie

Link to comment
https://forums.phpfreaks.com/topic/109744-a-php-inventry-sort-of-thing/
Share on other sites

If your planning on making this into a game where you can login and check your ongoing progress etc you're going to need a database.

 

Obviously I have no idea of your knowledge of PHP and programming but for a start have a look at MySQL...if you can install a program called PHPMyAdmin on your web server you can easily create tables in a database like you would in Microsoft Access for example.

 

In your database you would want tables for

-Users

-Pokemon

-Inventory

 

Each user would have a unique ID, each type of Pokemon would also have a unique ID...the inventory table could therefore just contain the ID of the user and the ID of the pokemon they have captured so on your PHP page it would just add this as a record within the Inventory table.

 

I'm not sure if your following or have the knowledge to do this but if not I think you'll find it very rewarding in achieving this little project.

 

Hope this is a starting guideline for you

 

Regards,

Scott.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.