Jump to content

Cpanel email script help!


SeanStar

Recommended Posts

I've already developed a cpanel api for this, but I'm in need of some help in this area..

Basically I need to put an if statement inside an else if statement.. with an else to something different if the else if statement is incorrect.

 

It might sound kinda complicated, but in the time that I've been developing php scripts, this has never been an issue. Help, please?

 

if($_POST['newpass']=="")
{
echo "";
}
else if($_POST['newpass']==$_POST['newpass2'])
{
/* Check if the response is true or false and give an output for each one */
else if($response === false)
{
echo "<center>Email password is invalid!</center>";
}
else
{
echo "<center>New password submitted.</center>";
$xmlapi->api1_query($email.'@'.$emaildomain, "Email", "passwdpop", array($email, $newpass, 0, $cpaneldomain));
/* Then if the post variable newpass doesn't equal newpass2 display this. */
}
else
{
echo "<center>The two new password fields must be the same.</center>";
}

Link to comment
https://forums.phpfreaks.com/topic/186996-cpanel-email-script-help/
Share on other sites

if($_POST['newpass']=="") {
echo "";
} else if($_POST['newpass']==$_POST['newpass2']) {
/* Check if the response is true or false and give an output for each one */	
if($response === false) {
	echo "<center>Email password is invalid!</center>";
} else {
	echo "<center>New password submitted.</center>";
	$xmlapi->api1_query($email.'@'.$emaildomain, "Email", "passwdpop", array($email, $newpass, 0, $cpaneldomain));
	/* Then if the post variable newpass doesn't equal newpass2 display this. */
}
} else {
echo "<center>The two new password fields must be the same.</center>";
}

Might be what your lookin for :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.