Deacon Frost
05-15-2008, 06:38 AM
Hey guys, long time no see. I stopped programming for a couple of months, and now I'm really fuzzy and can't even fix up a nice password change form O.o. Anyways, I'm having issues setting it up, here's my current code, and my issue at the bottom...
<?
$url = $_GET['$password'];
$oldpass = $_GET["oldpassword"];
$newpass = $_POST["newpassword"];
$newpass2 = $_POST["newpassword2"];
if(isset($password) && isset($newpass))
{
echo "".$oldpass.",".$newpass.",".$newpass2.".";
}
?>
<?
elseif(isset($password) && !isset($newpass))
{
?>
<form action="?password=<? echo $newpass ?>" method="post" ?>
Please enter your old password:<br /> <input type="password" name="oldpassword" /><br /><br />
Please enter your new password:<br /> <input type="password" name="newpassword" /><br /><br />
Please confirm your new password:</br /> <input type="password" name="newpassword2" /><br /><br />
<input type="submit" value="Change Password">
</form>
<?
}
else
{
?>
<div id="content">
<h2><a href"?password=">Change Password</a></h2>
<?
}
?>
E: Oh Yeah:
My Error = Parse error: syntax error, unexpected T_ELSEIF in accoptions.php on line 21
Now, what I want, it should display the Change Password thing at the bottom (The 'Else' option) if every other criteria is not met. If you have clicked it, it should display the elseif option, and if you have changed everything, it should echo just the data (I haven't attached the database to it yet, so it's not updating).
Thanks in advance :D.
<?
$url = $_GET['$password'];
$oldpass = $_GET["oldpassword"];
$newpass = $_POST["newpassword"];
$newpass2 = $_POST["newpassword2"];
if(isset($password) && isset($newpass))
{
echo "".$oldpass.",".$newpass.",".$newpass2.".";
}
?>
<?
elseif(isset($password) && !isset($newpass))
{
?>
<form action="?password=<? echo $newpass ?>" method="post" ?>
Please enter your old password:<br /> <input type="password" name="oldpassword" /><br /><br />
Please enter your new password:<br /> <input type="password" name="newpassword" /><br /><br />
Please confirm your new password:</br /> <input type="password" name="newpassword2" /><br /><br />
<input type="submit" value="Change Password">
</form>
<?
}
else
{
?>
<div id="content">
<h2><a href"?password=">Change Password</a></h2>
<?
}
?>
E: Oh Yeah:
My Error = Parse error: syntax error, unexpected T_ELSEIF in accoptions.php on line 21
Now, what I want, it should display the Change Password thing at the bottom (The 'Else' option) if every other criteria is not met. If you have clicked it, it should display the elseif option, and if you have changed everything, it should echo just the data (I haven't attached the database to it yet, so it's not updating).
Thanks in advance :D.