Jiraiya Posted April 22, 2009 Share Posted April 22, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/155131-i-dont-know-how-to-do-this/ Share on other sites More sharing options...
premiso Posted April 22, 2009 Share Posted April 22, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/155131-i-dont-know-how-to-do-this/#findComment-816057 Share on other sites More sharing options...
Jiraiya Posted April 22, 2009 Author Share Posted April 22, 2009 i do know the basics the thing im really not sure is how to substitute the variable with one choosen by a user Quote Link to comment https://forums.phpfreaks.com/topic/155131-i-dont-know-how-to-do-this/#findComment-816065 Share on other sites More sharing options...
premiso Posted April 22, 2009 Share Posted April 22, 2009 PHP Basic Database Handling Tutorial Quote Link to comment https://forums.phpfreaks.com/topic/155131-i-dont-know-how-to-do-this/#findComment-816068 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.