Ok, first off I am not doing this course,
but after reading a post from another student asking about classes in 2613... well my ego got the best of me and I decided to rewrite my web page in a more OOP way.
(and I know its not needed in year 2, but I like learning this and am impatient, so please help me)
My Question:
so I have a person class...
with methods...
a constructor method and a display method that does something like this...
Language: PHP
echo "<td>"".$this->Username . "</td><td><a href=PHP/deleteP.php?player_id=".$this->ID.">Delete</a></td></tr>";
but I have a method to delete this person from the db...
Language: PHP
Person->Delete();
but as this is sitting server side... how do I call this method in the hreff... is it possible, can I do it with a button?
should I even have a method like this?
or just use my previous code: (that works?)
Language: PHP
deleteP.php?player_id=".$this->ID