Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8167197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:07:28+00:00 2026-06-06T20:07:28+00:00

I’m using Mozilla Thunderbird with xampp – mercury, apache, mysql The problem is when

  • 0

I’m using Mozilla Thunderbird with xampp – mercury, apache, mysql

The problem is when I order one product, it sends the order email with everything in place. It looks like this for one product:

Order date and time: July 1, 2012, 11:04 am
Thank you for your order at our online shop!
Your order information:


    Product ID: 1991001
    Brand: Razer
    Model: Mamba Elite Wireless Gaming Mouse
    Price per item: 129.99
    Amount of item: 1
    Total cost: 129.99
    _________________________________________________|
    1To follow your odertracking please remember your order ID and customer ID
    Order ID: 116
    Customer ID: 6
    Link to track your order: Ordertracking system

When I order 5 products, it will only show 4 products in the email and will look like this:

Order date and time: July 1, 2012, 11:08 am
Thank you for your order at our online shop!
Your order information:


Product ID: 1991001
Brand: Razer
Model: Mamba Elite Wireless Gaming Mouse
Price per item: 129.99
Amount of item: 1
Total cost: 129.99
_________________________________________________|
1 Product ID: 1991002
Brand: Razer
Model: Imperator Expert Ergonomic Gaming Mouse
Price per item: 79.99
Amount of item: 1
Total cost: 79.99
_________________________________________________|
2 Product ID: 1991003
Brand: Razer
Model: Orochi Elite Mobile Gaming Mouse
Price per item: 79.99
Amount of item: 3
Total cost: 239.96999999999997
_________________________________________________|
3 Product ID: 1991004
Brand: Razer
Model: Expert Ambidextrous Gaming Mouse
Price per item: 79.99
Amount of item: 1
T 

I don’t see the 5th product and also don’t see:
To follow your odertracking please remember your order ID and customer ID
Order ID: 116
Customer ID: 6
Link to track your order: Ordertracking system

Why and how can I fix this problem?

Here is the code for the email. email.php, at the end you see $to = $email;

<?php
//var_dump($_GET);

//collect all information
$name = $_GET["name"];
$surname = $_GET["surname"];
$city = $_GET["city"];
$postalcode = $_GET["postalcode"];
$phonenumber = $_GET["phonenumber"];
$email = $_GET["email"];

$i = 1;
while (isset($_GET["Product_ID_".$i])) {
    $productid = $_GET["Product_ID_".$i];
    $brand = $_GET["Brand_".$i];
    $model = $_GET["Model_".$i];
    $price = $_GET["Price_".$i];
    $amount = $_GET["Amount_products_".$i];
    $totalcost = $_GET["Total_cost_".$i];
    $i++;
}

$image = "includes/images/mouse_4.jpg";


$date = date("F j, Y, g:i a");



//connect to database
$connection = mysql_connect("localhost","root","") or die ("Can't connect");
mysql_select_db("shoppingcart", $connection) or die ("Can't connect");  

//check if already customer
$result = mysql_query("SELECT * FROM customer WHERE email='$email'");
$rows = mysql_num_rows($result);


    if ($rows) 
    {
      echo '<br>Welcome back ' . $name .' '. $surname. '<br>';
    }
    else
    {
        //if new customer, add to database
        $customer = "INSERT INTO customer (customerid, name, surname, email, city, postalcode, phonenumber) VALUES ('', '$name', '$surname', '$email', '$city', '$postalcode', '$phonenumber')";
        if (!mysql_query($customer,$connection))
        {
            die('Error: ' . mysql_error());
            echo "Sorry, there was an error";
        }
        echo "New customer added" . "<br />";
        echo '<br>Welcome as our new customer ' . $name . ' '. $surname;

        mysql_close($connection);   
    }

//connect to database
$connection = mysql_connect("localhost","root","") or die ("Can't connect");
mysql_select_db("shoppingcart", $connection) or die ("Can't connect");


//get customer id
$res = mysql_query("SELECT customerid FROM customer WHERE email='$email'");
while($row=mysql_fetch_array($res))
{
 $customerid=$row['customerid'];
}
    //add new ordertracking
    $ordertracking = "INSERT INTO `ordertracking` (orderid, customerid, email, progress, date) VALUES ('', '$customerid', '$email', 'Pending', '$date')";
    if (!mysql_query($ordertracking,$connection))
        {
            die('Error: ' . mysql_error());
            echo "Sorry, there was an error";
        }
        echo "New order added" . "<br />";

        mysql_close($connection);

//connect to database
$connection = mysql_connect("localhost","root","") or die ("Can't connect");
mysql_select_db("shoppingcart", $connection) or die ("Can't connect");

//get order id
$vol = mysql_query("SELECT orderid FROM ordertracking WHERE email='$email'");
while($volume=mysql_fetch_array($vol))
{
 $orderid = $volume['orderid'];
}
    // add new order
    $order = "INSERT INTO `order` (orderid, customerid, productid, brand, model, price, amount, totalcost, image) VALUES ('$orderid', '$customerid', '$productid', '$brand' , '$model', '$price', '$amount', '$totalcost', '$image')";
    if (!mysql_query($order,$connection))
        {
            die('Error: ' . mysql_error());
            echo "Sorry, there was an error";
        }
        echo "New order added" . "<br />";

        mysql_close($connection);


$to = $email;
$subject = "Order information of: ";

$headers = "From: " . "postmaster@localhost" . "\r\n";
$headers .= "Reply-To: ". "postmaster@localhost" . "\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

$message = '<html><body>';
$message .= '<h1>Dear ' . $name . ' ' . $surname .  ',</h1>' . '<br />';
$message .= 'Order date and time: ' . $date . '<br />';
$message .= 'Thank you for your order at our online shop!' . '<br />';
$message .= 'Your order information: ' . '<br /><br /><br />';
$i = 1;
while (isset($_GET["Product_ID_".$i])) {
    $productid = $_GET["Product_ID_".$i];
    $brand = $_GET["Brand_".$i];
    $model = $_GET["Model_".$i];
    $price = $_GET["Price_".$i];
    $amount = $_GET["Amount_products_".$i];
    $totalcost = $_GET["Total_cost_".$i];

    $message .= ' Product ID: ' . $productid . "<br />" .
                'Brand: '. $brand . "<br />" .
                'Model: ' . $model . "<br />" .
                'Price per item: ' . $price . "<br />" .
                'Amount of item: ' . $amount . "<br />" .
                'Total cost: ' . $totalcost . "<br />" .
                '_________________________________________________| ' . "<br />" .
    $i++;
}
$message .= 'To follow your odertracking please remember your order ID and customer ID' . '<br />';
$message .= 'Order ID: ' . $orderid . '<br />';
$message .= 'Customer ID: ' . $customerid . '<br />';
$message .= 'Link to track your order: ' . '<a href="http://localhost/school/shoppingcart/ordertracking.php">Ordertracking system</a>' . '<br />';

$message .= '</body></html>';

mail($to, $subject, $message, $headers);

?>
<meta http-equiv="REFRESH" content="3;ordertracking.php">

EDIT for var dump outpu:

array(38) { ["Product_ID_1"]=> string(7) "1991001" ["Brand_1"]=> string(5) "Razer" ["Model_1"]=> string(33) "Mamba Elite Wireless Gaming Mouse" ["Price_1"]=> string(6) "129.99" ["Amount_products_1"]=> string(1) "1" ["Total_cost_1"]=> string(6) "129.99" ["Product_ID_2"]=> string(7) "1991002" ["Brand_2"]=> string(5) "Razer" ["Model_2"]=> string(39) "Imperator Expert Ergonomic Gaming Mouse" ["Price_2"]=> string(5) "79.99" ["Amount_products_2"]=> string(1) "1" ["Total_cost_2"]=> string(5) "79.99" ["Product_ID_3"]=> string(7) "1991003" ["Brand_3"]=> string(5) "Razer" ["Model_3"]=> string(32) "Orochi Elite Mobile Gaming Mouse" ["Price_3"]=> string(5) "79.99" ["Amount_products_3"]=> string(1) "1" ["Total_cost_3"]=> string(5) "79.99" ["Product_ID_4"]=> string(7) "1991004" ["Brand_4"]=> string(5) "Razer" ["Model_4"]=> string(32) "Expert Ambidextrous Gaming Mouse" ["Price_4"]=> string(5) "79.99" ["Amount_products_4"]=> string(1) "1" ["Total_cost_4"]=> string(5) "79.99" ["Product_ID_5"]=> string(7) "1991005" ["Brand_5"]=> string(5) "Razer" ["Model_5"]=> string(62) "Battlefield 3â„¢ Razer Imperator Expert Ergonomic Gaming mouse" ["Price_5"]=> string(5) "79.99" ["Amount_products_5"]=> string(1) "1" ["Total_cost_5"]=> string(5) "79.99" ["name"]=> string(1) "s" ["surname"]=> string(1) "s" ["city"]=> string(1) "s" ["postalcode"]=> string(1) "s" ["phonenumber"]=> string(1) "s" ["email"]=> string(17) "klant-x@localhost" ["x"]=> string(2) "85" ["y"]=> string(2) "12" } 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T20:07:30+00:00Added an answer on June 6, 2026 at 8:07 pm

    I think the problem lies in the passing of all that information via the query string.

    Instead, you should sent it via POST based form, and then use $_POST.

    If you’re already using a form, then just change the method attribute to POST

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.