Page 1 of 1

PHP Mail Form Generating PDF attachment

Posted: Thu Feb 14, 2008 9:40 pm
by jackstraw1975
Hi I am new to the board and need help, i am a graphic designer not a programmer and am helping a friend with a website addition.
The client/friend wants an email form that works like a shopping cart where users will manually fill in the items, qty, & price of the items they want to order
and it tabulates price subtotals and total, using a kaosweaver javascript & php novice form I made this work, here is the url:

http://www.ryot.com/volo/catalog.html

the problem is the email orders are difficult to read, here is an example of what he receives:

The form below was submited by haywood.thomas@charter.net from Ip address: 68.117.219.8 on 02/14/2008 at 02:33 am
-------------------------------------------------------------------------

company; old guard graphics
name; haywood thomas
phone; 706 549 4505
email; haywood.thomas@charter.net
address; 260 cleveland ave
city; athens
state; GA
zip; 30601
payment; pay with check
shipping; ship ground
confimation_phone; confirmation by phone
notes; volo form test 2.8 windows XP / ie7
item_1; OB
size_1;
color_1;
qty; 24
price; 7
sub; 168.00
item_2; 1905 WM 2
size_2;
color_2;
qty_2; 24
price_2; 8.00
sub_2; 192.00
item_3;
size_3;
color_3;
qty_3;
price_3;
sub_3; 0.00
item_4;
size_4;
color_4;
qty_4;
price_4;
sub_4;
item_5;
size_5;
color_5;
qty_5;
price_5;
sub_5; 0.00
item_6;
size_6_;
color_6_;
qty_6;
price_6;
sub_6; 0.00
item_7;
size_7_;
color_7_;
qty_7;
price_7;
sub_7; 0.00
item_8;
size_8_;
color_8_;
qty_8;
price_8;
sub_8; 0.00
item_9;
size_9_;
color_9;
qty_9;
price_9;
sub_9; 0.00
item_10;
size_10;
color_10;
qty_10;
price_10;
sub_10; 0.00
item_11;
size_11;
color_11;
qty_11;
price_11;
sub_11; 0.00
item_12;
size_12;
color_12;
qty_12;
price_12;
sub_12; 0.00
item_13;
size_13;
color_13;
qty_13;
price_13;
sub_13;
item_14;
size_14;
color_14;
qty_14;
price_14;
sub_14;
item_15;
size_15_;
color_15;
qty_15;
price_15;
sub_15;
item_16;
size_16_;
color_16;
qty_16;
price_16;
sub_16;
item_17;
size_17_;
color_17;
qty_17;
price_17;
sub_17;
item_18;
size_18_;
color_18;
qty_18;
price_18;
sub_18; 0.00
item_19;
size_19_;
color_19;
qty_19;
price_19;
sub_19;
item_20;
size_20_;
color_20;
qty_20;
price_20;
sub_20;
item_21;
size_21;
color_21;
qty_21;
price_21;
sub_21; 0.00
item_22;
size_22;
color_22;
qty_22;
price_22;
sub_22; 0.00
item_23;
size_23;
color_23;
qty_23;
price_23;
sub_23; 0.00
item_24;
size_24;
color_24;
qty_24;
price_24;
sub_24; 0.00
total; 360.00
SUBMIT; PLACE ORDER NOW

obviously this is not the most efficient method. What he would like is the site to automatically create a pdf or xls file based on the form info that is easier to interperet, and have it automatically emailed to him.

I either need someone to spell out an easy way for me to do this with minimal programming or someone who wants to program this on a contract basis for me.
Sorry for being so long winded and thanks in advance for any help.
-haywood

Re: PHP Mail Form Generating PDF attachment

Posted: Fri Feb 15, 2008 12:56 pm
by califdon
Creating a pdf document requires a substantial knowledge of programming. I would suggest that you might more easily just format the information better, using spaces and linefeeds (the characters \r\n in an email) to group related data on the same lines and reducing the length of the email.

Re: PHP Mail Form Generating PDF attachment

Posted: Fri Feb 15, 2008 1:23 pm
by RobertGonzalez
It looks to me like you are dumping the $_POST array as a $key => $value foreach into this text file.

Like Califdon said, a little formatting goes a long way.

Re: PHP Mail Form Generating PDF attachment

Posted: Sun Feb 17, 2008 6:12 pm
by jackstraw1975
Thanks for the advice, where do I put in the spaces & linefeeds in the document?
Could you show an example of this or do you know of any tutorials on the subject?
Thanks Again,
-haywood

Re: PHP Mail Form Generating PDF attachment

Posted: Sun Feb 17, 2008 8:43 pm
by RobertGonzalez
You put them where ever it makes sense to put them. I'd say take a basic layout of a text document and then make the mailed document look like the mock up.