View Full Version : submit php form for ammending, with auto reply

10-07-2012, 08:20 PM
Hi all,

I'd like to firstly get a yes or no to whether this is possible in principle. A user would fill in a very basic php form, around six text fields (one of which is their email address). They would then submit this form to me, still as an online form, but with their fields filled in.

(Do I use fopen('filename.txt', 'a'); or similar?)

I would then fill in extra detail by way of more text fields. I would then click submit again, and it would automatically generate date and order number (auto_increment?); then send the originator a confirmation email stating the date it was opened by me, and the generated order number. It would then generate a PDF of the finished form to me for printing.

I've built basic php forms before that just submit in-putted info to an email address, but this is altogether more complex.. :)

I have this one
(http://www.hanworthclub.co.uk/wagessheettest.php)that I can use as a test bed..

php code to follow, although my intended for will have far fewer parameters. I just thought that before I wrote the new form from scratch I'd make sure it was possible.. :)














$subject = "Wages Sheet: Week ending: Sunday, $Day $Month $Year.";
$sendto = "someone@emails.com";
$from = "someoneelse@emails.co.uk";
$body = "This is the staff wages information for the week ending: Sunday, $Day $Month $Year.


Holidays taken this week.

Holidays taken by John Scott: $JSHol
Holidays taken by Kath Robinson: $KRHol


Standard Shifts worked this week.

Monday; Shift One: 4.75 Hours: $MonS1
Monday; Shift Two: 2.75 Hours: $MonS2

Tuesday; Shift One: 4.75 Hours: $TueS1
Tuesday; Shift One: 3.75 Hours: $TueS2

Wednesday; Shift One: 4.25 Hours: $WedS1
Wednesday; Shift Two: 2.75 Hours: $WedS2

Thursday; Shift One: 4.25 Hours: $ThuS1
Thursday; Shift Two: 2.75 Hours: $ThuS2

Friday; Shift One: 4.25 Hours: $FriS1
Friday; Shift Two: $FriS2H: $FriS2

Saturday; Shift One: 5.75 Hours: $SatS1
Saturday; Shift Two: 3.75 Hours: $SatS2

Sunday Lunch; Shift One: $SunLS1H: $SunLS1
Sunday Lunch; Shift Two: 2.75 Hours: $SunLS2

Sunday Evening; Shift One: 4.25 Hours: $SunES1
Sunday Evening; Shift Two: 2.75 Hours: $SunES2

Saturday Cleaner: $WeeklyCleanH : $WeeklyClean : $AltClean


Saturday Afternoon; Shift One: $SatAftS1H: $SatAftS1
Saturday Afternoon; Shift Two: $SatAftS2H: $SatAftS2


Saturday Function; Shift One: $SatFuncS1H: $SatFuncS1
Saturday Function; Shift Two: $SatFuncS2H: $SatFuncS2

Saturday Function Cleaner: $FuncCleanH: $FuncClean : $AltFuncClean


Bank Holiday Monday; Shift One: $BHMonS1H: $BHMonS1
Bank Holiday Monday; Shift Two: $BHMonS2H: $BHMonS2


Bank Holiday Friday; Shift One: $BHFriS1H: $BHFriS1
Bank Holiday Friday; Shift Two: $BHFriS2H: $BHFriS2


Christmas Day; Shift One: $XmasDayS1H: $XmasDayS1
Christmas Day; Shift Two: $XmasDayS2H: $XmasDayS2


Boxing Day Lunch; Shift One: $BoxDayLS1H: $BoxDayLS1
Boxing Day Lunch; Shift Two: $BoxDayLS2H: $BoxDayLS2

Boxing Day Evening; Shift One: $BoxDayES1H: $BoxDayES1
Boxing Day Evening; Shift Two: $BoxDayES2H: $BoxDayES2


New Years Day Lunch; Shift One: $NYDayLS1H: $NYDayLS1
New Years Day Lunch; Shift Two: $NYDayLS2H: $NYDayLS2

New Years Day Evening; Shift One: $NYDayES1H: $NYDayES1
New Years Day Evening; Shift Two: $NYDayES2H: $NYDayES2


New Years Eve; Shift One: $NYEveS1H: $NYEveS1
New Years Eve; Shift Two: $NYEveS2H: $NYEveS2
New Years Eve; Shift Three: $NYEveS3H: $NYEveS3
New Years Eve; Shift Four: $NYEveS4H: $NYEveS4

New Years Day Cleaner: $NYDayCleanH: $NYDayClean : $AltNYDayClean




I don't mind working out the code for myself, but if you could let me know if it's possible firstly, and then a few pointers to get me going.

Thanks in advance,