I just finished my php code for my online store, but I have a couple of issues, but the email is sending fine, when the user fill out the form, I can check all the data and proceed, but I have an issue
$email = $_POST["email"];
$to = "xxxx;
//card data
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$number = $_POST['number'];
$expiry = $_POST['expiry'];
$cvc = $_POST = ['cvc'];
//end of card data
//personal data
$address = $_POST['address'];
$city = $_POST['city'];
$zip = $_POST['zip'];
//end
$subject = "New data from $first_name $last_name";
$headers = "From: $email\n";
$message = "Name: $first_name $last_name \nCard data: $number $expiry $cvc $address $city $zip";
$usermessage = "Thank you for your payment, we will be with you shortly.";
mail($to,$subject,$message,$headers);
mail($user,$usersubject,$usermessage,$userheaders);
?>
for some weird reason this is the email i got
Name: Eduardo Gomez
Card data: xxxxxxxxxxxx xx/xx Array
I cant see the address or the cvc. In fact I Undefined index: zip, and I also get : Array to string conversion
I know that One of you will put duplicate and close it, but could I get some help before that happen, thanks and happy 2020