Forum Moderators: coopster
I've tried replacing the "AND" with a semicolon. All that did was call the second function only. With the "AND" it only calls the first function. Is there any way to call them both or do I have to insert the second function into the first and have it called that way?
$message= $objU->register_step_three($_SESSION['register_id']) AND $message= $objU->register_freecode(addslashes(FREE), $_SESSION['register_id']);
I put the function register_freecode inside of the register_step_three to make this work so the line just reads like this now:
$message= $objU->register_step_three($_SESSION['register_id']);
Is there a way to make it work as I was trying to in the first example? I may not be phrasing the question correctly. I was trying to cause the click of the "submit" button to call two functions instead of one function that contained both.
else if ($step == "4") {
$objU->register_step_three($_SESSION['register_id']);
$objU->register_freecode(addslashes(FREE), $_SESSION['register_id']);
} else if ($step == "4") {
$message = $objU->register_step_three($_SESSION['register_id']);
if ($message) {
$objU->register_freecode(addslashes(FREE), $_SESSION['register_id']);
}
}