Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

PHP select output

Avatar of jskewes
jskewes asked on
PHPMySQL Server
4 Comments1 Solution248 ViewsLast Modified:
I am using PHPrunner to build a project. In an email output configuration I have the code pasted below and output pasted below.
My question; how can I limit the output to just the fields specified? You can see at the bottom of the output, fields are repeated.
Thanks.
/john

---------------------------------
//**********  Send email with new data  ************

$email="jskewes@domain.com";
$message = "GetReady Ticket"."\r\n";
$message.= "StockNumber : ".$values["StockNumber"]."\r\n";
$message.= "Customer : ".$values["Customer"]."\r\n";
$message.= "DatePosted : ".$values["DatePosted"]."\r\n";
$message.= "New/Used : ".$values["New/Used"]."\r\n";
$message.= "DateTimeDue : ".$values["DateTimeDue"]."\r\n";
$message.= "SeviceNotes : ".$values["SeviceNotes"]."\r\n";
$message.= "Details : ".$values["Details"]."\r\n";
$message.= "KeysAt : ".$values["KeysAt"]."\r\n";
$message.= "CarAt : ".$values["CarsAt"]."\r\n";
$message.= "Completed : ".$values["Completed"]."\r\n";
$message.= "F&I Sales : ".$values["F&I Sales"]."\r\n";
$message.= "SalesPerson : ".$values["SalesPerson"]."\r\n";
$message.= "Email : ".$values["Email"]."\r\n";
$message.= "Completed : ".$values["Completed"]."\r\n";
$message.= "Index : ".$values["Index"]."\r\n";

$subject=$values["StockNumber"]." sold by ".$values["SalesPerson"]." "."has been updated by F&I";

foreach($values as $field=>$value)
      $message.= $field." : ".$value."\r\n";
      
mail($email, $subject, $message,"From:F-I@GetReady.com");

//**********  Redirect to another page  ************
header("Location: http://lwaginet/minigetready/f-i/F_I_Sale_list.php");
exit();


Output
-------------------------------------

GetReady Ticket
StockNumber : a321b456
Customer : Stebbins
DatePosted : 2008-07-11
New/Used : New
DateTimeDue : 2008-07-11 00:00:00
SeviceNotes : this car is a real peach
Details : ignore - sorry for all the tests
KeysAt : Board
CarAt :
Completed : No
F&I Sales :
SalesPerson : john
Email : administrator@domain.com
Completed : No
Index :
StockNumber : a321b456
DatePosted : 2008-07-11
New/Used : New
DateTimeDue : 2008-07-11 00:00:00
Time : 08:00:00
SalesPerson : john
Email : administrator@ domain.com
Customer : Stebbins
Details : ignore - sorry for all the tests
KeysAt : Board
CarAt : Lot
SeviceNotes : this car is a real peach
Completed : No
index : 32
F&I Sales :
ASKER CERTIFIED SOLUTION
Avatar of hernst42
Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers