SeanStar Posted January 3, 2010 Share Posted January 3, 2010 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 More sharing options...
Buddski Posted January 3, 2010 Share Posted January 3, 2010 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 Link to comment https://forums.phpfreaks.com/topic/186996-cpanel-email-script-help/#findComment-987464 Share on other sites More sharing options...
SeanStar Posted January 3, 2010 Author Share Posted January 3, 2010 Not quite solved, but it helped a bunch. The part that wasn't solved was unrelated to this, and actually an issue with the api. Thanks Link to comment https://forums.phpfreaks.com/topic/186996-cpanel-email-script-help/#findComment-987483 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.