Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29758

undefined index, in email send and cannot see all the data

$
0
0

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

Viewing all articles
Browse latest Browse all 29758

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>