Hello, I have two submit id, one called id="jump" and the other called id="run" the code: $action = trim($_GET['id']); $action = (empty($action) || $action == '') ? 'jump' : 'run'; if($action == 'jump') { xxxxxxx xxxxxxx xxxxxxx } if($action == 'run') { xxxxxxx xxxxxxx xxxxxxx } PHP: But for some reason its only taking the jump function but not working on the run function. Any idea why? Thank you!!
Try this.. $action = trim($_GET['id']); $action = (!isset($_GET['id']) || $_GET['id'] == '') ? 'jump' : $action; if($action == 'jump') { echo 'jump'; } if($action == 'run') { echo 'run'; } PHP: