Jump to content

Recommended Posts

I need to know how to create a math system that pulls variables from a table that are selected

im trying to create a program to do math with variables that are choosen by the user

for example if i were to use a fighitng game it would be like

Player 1

options

Health (variable) is 25       

punch(variable) is 10           

kick 5

i need to make it so that the user picks the variable from a list and then the the variable that they pick is put into a equation with the only thing changing in the equation is the variable choose by the user

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/155131-i-dont-know-how-to-do-this/
Share on other sites

Math in PHP is pretty straight forward. Do you know how to write SQL? Do you know how to write PHP? Do you know how to use MySQL?

 

If not I would suggest learning that first. As it is essential to do a database driven PHP script. Do you have current code to show us? (I kind of doubt you do). Math in PHP is not much different than math done on paper, except it is typed on the computer and the computer can do all the computing a ton faster than you can.

 

So yea. Provide us with some code or learn the basics of PHP and MySQL then come back when you have attempted this (if you have not already attempted it) and run into a road block.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.