syntax error, unexpected 'endif' (T
This question already has an answer here:
What is the following doing?
<?php endif; ?>
You're closing a non existent if statement - based on the code you've given.
You are missing semicolon in both of if statement
View
if ($exec == 'true'){
echo '<script type="text/javascript">
alert("email alreay exist");
</script>';
}
Controller
if($exec) {
true;
} else {
FALSE;
}
Please replace your code as per above explanation. i hope it will work for you !
SIMPLE ANSWER. REMOVE THE <?php endif; ?>
<?php endif; ?>
FROM YOUR CODE AND IT WORKS LIKE A CHARM. ALSO, ADD ;
AT THE END OF echo
STATEMENT
下一篇: 语法错误,意想不到的'endif'(T