In this part, the member has logged in, but they want to change something more than just their login name and password.
For that, they fill out this form, which gets mailed to the admin to make the big changes. The values are passed via hidden fields. Everything seems to be fine, except it won't mail. Also the checked boxes used come through, now for some reason they don't.
changeuser.php
there is another form above this to change regular user info- that works just fine.
...
<h2> Do you need to update other information? </h2>
<form method="POST" name="changebig" action="change.php">
<h3>What do you need to change?</h3>
<input type="checkbox" name="changeitem[]" value="accountnumber"><b>account number</b><br />
<input type="checkbox" name="changeitem[]" value="contactid"><b>contact id</b><br />
<input type="checkbox" name="changeitem[]" value="orgname"><b>organization name</b><br />
<input type="checkbox" name="changeitem[]" value="accountname"><b>account name</b><br />
<input type="checkbox" name="changeitem[]" value="networkrep"><b>network representative</b><br />
<input type="checkbox" name="changeitem[]" value="network"><b>network</b><br />
<textarea name="whychange" rows="5" cols="25">Please explain what has occurred that necessitates these changes.</textarea><br />
<input type="hidden" name="email" value="<?php echo $email; ?>">
<input type="hidden" name="contactid" value="<?php echo $contactid; ?>">
<input type="hidden" name="account_number" value="<?php echo $account_number; ?>">
<input type="hidden" name="organizational_title" value="<?php echo $organization_title; ?>">
<input type="hidden" name="account_name" value="<?php echo $account_name; ?>">
<input type="hidden" name="organizationDBA" value="<?php echo $organizationDBA; ?>">
<input type="hidden" name="network_representative" value="<?php echo $network_representative; ?>">
<input type="hidden" name="network" value="<?php echo $network; ?>">
<input type="hidden" name="firstname" value="<?php echo $firstname; ?>">
<input type="hidden" name="lastname" value="<?php echo $lastname; ?>">
<input type="submit" name="submit" value="submit"><input type="reset">
</form>
change.php
<?php
$to='testing@mytestemail.com';
$changeitem=$_POST['changeitem'];
$whychange=$_POST['whychange'];
$email=$_POST['email'];
$contactid=$_POST['contactid'];
$accountnumber=$_POST['account_number'];
$organization=$_POST['organization_title'];
$accountname=$_POST['account_name'];
$dba=$_POST['organizationDBA'];
$networkrep=$_POST['network_representative'];
$network=$_POST['network'];
$fname=$_POST['firstname'];
$lname=$_POST['lastname'];
$subject = "Member Change Form";
$headers = "From: '$email'\r\n";
$body = "This member needs to change:\n";
$body .= "'$changeitem' \n"; //when echo'ed this just says Array, used to show the actual selected items.
$body .= "Purpose for Change: '$whychange' \n";
$body .= "Contact Id: '$contactid' \n";
$body .= "Account Number: '$accountnumber' \n";
$body .= "Org Title: '$organization' \n";
$body .= "Account Name; '$accountname' \n";
$body .= "DBA: '$dba' \n";
$body .= "Rep: '$networkrep' \n";
$body .= "Network: '$network' \n";
$body .= "First Name: '$fname' \n";
$body .= "Last Name: '$lname' \n";
$body .= "Email: '$email' \n";
error_reporting(E_ALL);
echo $to;
echo '<br />';
echo $subject;
echo '<br />';
echo $headers;
echo '<br />';
echo $body;
//values come through here just fine, except the changeitem
if(mail($to,$subject,$body,$headers))
{
echo "Request made. We will contact you within 24 business hours.";
//makes me think it'll work, but no email is received.
}
else
{
echo "Message Not Sent";
}
?>
Thanks for the help!