- <?php
-
if(isset($_POST['order']))
-
{
-
require_once("connection.php");
-
$query= "insert into order1 (`total`,`quantity`,`firstname`,`date_createdAt`,`email`,`address`,`city`,`state`,`telephone`,`mobile2`,`comments`) values ('".$total."','".$quantity."','".$_POST['firstname']."','".date("Y-m-d h:i:s")."','".$_POST['email']."','".$_POST['address']."','".$_POST['city']."','".$_POST['state']."','".$_POST['telephone']."','".$_POST['telephone2']."','".$_POST['Comments']."')";
-
$result = mysqli_query($con, $query) or die(mysqli_error($con));
-
$max_query = mysqli_query($con, "SELECT max(id) FROM order1 ") or die(mysqli_error($con));
-
$max_row = mysqli_fetch_array($max_query);
-
-
-
if($cart){
-
foreach($cart as $k=>$v)
-
{
-
mysqli_query($con, "insert into product_order (`product_id`,`order_id`) values ('".$v->id."','".$max_row[0]."')") or die(mysqli_error($con));
-
}
-
}
-
-
-
-
-
unset($_SESSION['cart']);
-
unset($_SESSION['count']);
-
-
$to=$_POST['email'];
-
$subject = 'Order';
-
$message = 'your order has been received';
-
$headers = 'From:info@booksjerry.com' . "\r\n" .
-
'Reply-To: info@booksjerry.com' . "\r\n" .
-
'X-Mailer: PHP/' . phpversion();
-
-
if(mail($to, $subject, $message, $headers)){
-
echo"Mail Successfully Sent";
-
-
}
-
else{
-
echo"Mail Could not be Sent";
-
}
-
?>
0 1705 Sign in to post your reply or Sign up for a free account.
Similar topics
by: engrkhalid |
last post by:
Hello everybody,
When I send an email to any Hotmail account it goes directory to the
Junk Email!
My website is in a dedicated server using: Linux 2.4.21, Apache, PHP,
MySQL
I'm using the...
|
by: vishal |
last post by:
i am getting following error.
Warning: mail() : Failed to connect to mailserver at
"smtp.gmail.com" port 465, verify your "SMTP" and "smtp_port" setting
in php.ini or use ini_set() in...
|
by: Edward |
last post by:
My computer is at intranet,I want to use following code to realizing
function of sending mail.But this program only can send mail between
intranet.If I send mail in internet,I need to through proxy...
|
by: Henrik Bergman |
last post by:
Hi all
As I subscribe MSDN I got an USB-memory with Microsoft eLearing library.
I found an exampell how to send SMTP e-mail using CDO.Message object and
CDO.Configuration.
But when I try to...
|
by: Dean |
last post by:
I am using MailMessage (CDOSYS) to send emails. I would like to turn off the
SMTP service (it's on the local machine) and look at the emails in the
pickup folder before they get sent out. However,...
|
by: Ricardo Magalhaes |
last post by:
Hi,
I have an ASPX page and I need to call an ASP page sending parameters like
Name, Adress, ie. using POST method. This next ASP page show payment
informations..
If was from an ASP to...
|
by: Elankathir S.N. |
last post by:
Hi All,
I’m using ASP with VBScript…and I need to send mails using Lotus Notes
Mail Server (IBM).
How to communicate to the Lotus Notes Server and send mails???
Thanks,
- Elan
|
by: Ryan |
last post by:
Hi,
I receive an access denied error (see below) when attempting to send an
email with BodyFormat=MailFormat.Html from an asp.net page. Exactly the same
code works fine in a console...
|
by: Max |
last post by:
hi
I am using System.Web.Mail.MailMessage with System.Web.Mail.SmtpMail to
send mail. now the my question is,
Is it compulsory to add fields smtpauthenticate, sendusername and
sendpassword...
|
by: swetha123 |
last post by:
hello,
can any tell me how to send mails from site using mail() in php
do we need to change in the php.ini
these are in php.ini
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |