Ver original$csvcomments = $comment;open (CSVF,">>$csvfilename");print CSVF "\"";print CSVF "$months[$month] $day, $year $hour:$min:$sec";print CSVF "\",\"";print CSVF "$b_first";print CSVF "\",\"";print CSVF "$b_last";print CSVF "\",\"";print CSVF "$b_addr";print CSVF "\",\"";print CSVF "$b_addr2";print CSVF "\",\"";print CSVF "$b_city";print CSVF "\",\"";print CSVF "$b_state";print CSVF "\",\"";print CSVF "$b_zip";print CSVF "\",\"";print CSVF "$b_phone";print CSVF "\",\"";print CSVF "$b_fax";print CSVF "\",\"";print CSVF "$b_email";print CSVF "\",\"";print CSVF "$s_first";print CSVF "\",\"";print CSVF "$s_last";print CSVF "\",\"";print CSVF "$s_addr";print CSVF "\",\"";print CSVF "$s_addr2";print CSVF "\",\"";print CSVF "$s_city";print CSVF "\",\"";print CSVF "$s_state";print CSVF "\",\"";print CSVF "$s_zip";print CSVF "\",\"";print CSVF "$s_phone";print CSVF "\",\""; print CSVF "$QUANTITY_1";print CSVF "\",\"";print CSVF "\$$PRICE_1";print CSVF "\",\"";print CSVF "$ID_1";print CSVF "\",\"";print CSVF "$NAME_1";print CSVF "\",\"";print CSVF "$ADDTLINFO_1";print CSVF "\",\"";print CSVF "$QUANTITY_2";print CSVF "\",\"";print CSVF "\$$PRICE_2";print CSVF "\",\"";print CSVF "$ID_2";print CSVF "\",\"";print CSVF "$NAME_2";print CSVF "\",\"";print CSVF "$ADDTLINFO_2";print CSVF "\",\"";print CSVF "$QUANTITY_3";print CSVF "\",\"";print CSVF "\$$PRICE_3";print CSVF "\",\"";print CSVF "$ID_3";print CSVF "\",\"";print CSVF "$NAME_3";print CSVF "\",\"";print CSVF "$ADDTLINFO_3";print CSVF "\",\"";print CSVF "$QUANTITY_4";print CSVF "\",\"";print CSVF "\$$PRICE_4";print CSVF "\",\"";print CSVF "$ID_4";print CSVF "\",\"";print CSVF "$NAME_4";print CSVF "\",\"";print CSVF "$ADDTLINFO_4";print CSVF "\",\"";print CSVF "$QUANTITY_5";print CSVF "\",\"";print CSVF "\$$PRICE_5";print CSVF "\",\"";print CSVF "$ID_5";print CSVF "\",\"";print CSVF "$NAME_5";print CSVF "\",\"";print CSVF "$ADDTLINFO_5";print CSVF "\",\"";print CSVF "$QUANTITY_6";print CSVF "\",\"";print CSVF "\$$PRICE_6";print CSVF "\",\"";print CSVF "$ID_6";print CSVF "\",\"";print CSVF "$NAME_6";print CSVF "\",\"";print CSVF "$ADDTLINFO_6";print CSVF "\",\"";print CSVF "$QUANTITY_7";print CSVF "\",\"";print CSVF "\$$PRICE_7";print CSVF "\",\"";print CSVF "$ID_7";print CSVF "\",\"";print CSVF "$NAME_7";print CSVF "\",\"";print CSVF "$ADDTLINFO_7";print CSVF "\",\"";print CSVF "$QUANTITY_8";print CSVF "\",\"";print CSVF "\$$PRICE_8";print CSVF "\",\"";print CSVF "$ID_8";print CSVF "\",\"";print CSVF "$NAME_8";print CSVF "\",\"";print CSVF "$ADDTLINFO_8";print CSVF "\",\"";print CSVF "$QUANTITY_9";print CSVF "\",\"";print CSVF "\$$PRICE_9";print CSVF "\",\"";print CSVF "$ID_9";print CSVF "\",\"";print CSVF "$NAME_9";print CSVF "\",\"";print CSVF "$ADDTLINFO_9";print CSVF "\",\"";print CSVF "$QUANTITY_10";print CSVF "\",\"";print CSVF "\$$PRICE_10";print CSVF "\",\"";print CSVF "$ID_10";print CSVF "\",\"";print CSVF "$NAME_10";print CSVF "\",\"";print CSVF "$ADDTLINFO_10";print CSVF "\",\"";print CSVF "$QUANTITY_11";print CSVF "\",\"";print CSVF "\$$PRICE_11";print CSVF "\",\"";print CSVF "$ID_11";print CSVF "\",\"";print CSVF "$NAME_11";print CSVF "\",\"";print CSVF "$ADDTLINFO_11";print CSVF "\",\"";print CSVF "$QUANTITY_12";print CSVF "\",\"";print CSVF "\$$PRICE_12";print CSVF "\",\"";print CSVF "$ID_12";print CSVF "\",\"";print CSVF "$NAME_12";print CSVF "\",\"";print CSVF "$ADDTLINFO_12";print CSVF "\",\"";print CSVF "$QUANTITY_13";print CSVF "\",\"";print CSVF "\$$PRICE_13";print CSVF "\",\"";print CSVF "$ID_13";print CSVF "\",\"";print CSVF "$NAME_13";print CSVF "\",\"";print CSVF "$ADDTLINFO_13";print CSVF "\",\"";print CSVF "$SUBTOTAL";print CSVF "\",\"";print CSVF "$TOTAL";print CSVF "\",\"";print CSVF "$SHIPPING";print CSVF "\",\"";print CSVF "$comment";print CSVF "\"\n";close CSVF;}open (MAIL,"|$mailprogram");print MAIL "To: $b_email\n";print MAIL "From: $youremail\n";print MAIL "Subject: Order Confirmation\n";print MAIL "\n\n";print MAIL "A new order has been received. A summary of this order appears below.\n";print MAIL "\n";print MAIL "Order Date: $months[$month] $day, $year $hour:$min:$sec \n"; print MAIL " \n";print MAIL "Bill To: \n";print MAIL "-------- \n";print MAIL " $b_first $b_last \n";print MAIL " $b_addr \n";print MAIL " $b_addr2 \n";print MAIL " $b_city, $b_state $b_zip \n";print MAIL " $b_phone \n";print MAIL " $b_fax \n";print MAIL " $b_email \n";print MAIL " \n";print MAIL " \n";print MAIL "Ship To: \n";print MAIL "-------- \n"; if ( $s_addr eq "" ) { print MAIL " Use Billing Address\n";} else {print MAIL " $s_first $s_last \n";print MAIL " $s_addr \n";print MAIL " $s_addr2 \n";print MAIL " $s_city, $s_state $s_zip \n";print MAIL " $s_phone \n";} print MAIL " \n";print MAIL " \n";print MAIL "Qty Price(\$) Product ID - Product Name\n";print MAIL "\n";print MAIL "$QUANTITY_1 \$$PRICE_1 $ID_1 - $NAME_1 $ADDTLINFO_1 \n";if( $NAME_2 ) {print MAIL "$QUANTITY_2 \$$PRICE_2 $ID_2 - $NAME_2 $ADDTLINFO_2 \n";}if( $NAME_3 ) {print MAIL "$QUANTITY_3 \$$PRICE_3 $ID_3 - $NAME_3 $ADDTLINFO_3 \n";}if( $NAME_4 ) {print MAIL "$QUANTITY_4 \$$PRICE_4 $ID_4 - $NAME_4 $ADDTLINFO_4 \n";}if( $NAME_5 ) {print MAIL "$QUANTITY_5 \$$PRICE_5 $ID_5 - $NAME_5 $ADDTLINFO_5 \n";}if( $NAME_6 ) {print MAIL "$QUANTITY_6 \$$PRICE_6 $ID_6 - $NAME_6 $ADDTLINFO_6 \n";}if( $NAME_7 ) {print MAIL "$QUANTITY_7 \$$PRICE_7 $ID_7 - $NAME_7 $ADDTLINFO_7 \n";}if( $NAME_8 ) {print MAIL "$QUANTITY_8 \$$PRICE_8 $ID_8 - $NAME_8 $ADDTLINFO_8 \n";}if( $NAME_9 ) {print MAIL "$QUANTITY_9 \$$PRICE_9 $ID_9 - $NAME_9 $ADDTLINFO_9 \n";}if( $NAME_10 ){print MAIL "$QUANTITY_10 \$$PRICE_10 $ID_10 - $NAME_10 $ADDTLINFO_10 \n";}if( $NAME_11 ){print MAIL "$QUANTITY_11 \$$PRICE_11 $ID_11 - $NAME_11 $ADDTLINFO_11 \n";}if( $NAME_12 ){print MAIL "$QUANTITY_12 \$$PRICE_12 $ID_12 - $NAME_12 $ADDTLINFO_12 \n";}if( $NAME_13 ){print MAIL "$QUANTITY_13 \$$PRICE_13 $ID_13 - $NAME_13 $ADDTLINFO_13 \n";}print MAIL "\n";print MAIL "SUBTOTAL: $SUBTOTAL \n";print MAIL "TOTAL: $TOTAL \n";print MAIL "\n";print MAIL "FREIGHT: $SHIPPING \n";print MAIL "\n\n";print MAIL "Comments: \n";print MAIL "\n";print MAIL "$comment \n";print MAIL " \n";close MAIL;print "Content-type: text/html\n\n"; open (HEAD, $header);@LINES = <HEAD>;close HEAD;print @LINES; print "<h2>GRACIAS</h2>";print "Gracia por su compra";print "puede ponerse en contacto con nosotros.";print "<P>";print "<A HREF=\"$returnpage\" target=_top>Return Home</A>";print "<P>"; open (FOOT, $footer);@LINES = <FOOT>;close FOOT; print @LINES; exit;