function ChangePass($email,$password,$quota,$domain) {?>
<cpanel Email="passwdpop($email,$password,$quota,$domain)">
<? } ?>
This will produce mismatch and unwanted results. Making PHP and cpanel working together means understanding following:
- CPanel tags will be parsed only when the files are included using cpanel include (not php include) which in your case is true.
- CPanel include work only in one level. A file that is already included can not include more files (parser exits if this is the case)
- CPanel tags will run on file load independent of php statements. Example:
if ($blue) {
<cpanel Email="passwdpop($email,$password,$quota,$domain)">
}
The password will be changed on file load, no matter if blue is true or not. The cpanel parser will then deliver to the PHP parser following code:
if ($blue) {
Password successfully changed!
}
(or similar)
PHP will display a syntax error.
Actually the only way to work around it is: Make a page for new password submission. On "Submit", load a separate file with the proper cpanel commands to modify the password.
kosmo