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
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..

Code:
<?php
$Day=$_POST['Day'];
$Month=$_POST['Month'];
$year=$_POST['Year'];

$JSHol=$_POST['JSHol'];
$KRHol=$_POST['KRHol'];

$MonS1=$_POST['MonS1'];
$MonS2=$_POST['MonS2'];
$TueS1=$_POST['TueS1'];
$TueS2=$_POST['TueS2'];
$WedS1=$_POST['WedS1'];
$WedS2=$_POST['WedS2'];
$ThuS1=$_POST['ThuS1'];
$ThuS2=$_POST['ThuS2'];
$FriS1=$_POST['FriS1'];
$FriS2=$_POST['FriS2'];
$FriS2H=$_POST['FriS2H'];
$SatS1=$_POST['SatS1'];
$SatS2=$_POST['SatS2'];
$SunLS1=$_POST['SunLS1'];
$SunLS1H=$_POST['SunLS1H'];
$SunLS2=$_POST['SunLS2'];
$SunES1=$_POST['SunES1'];
$SunES2=$_POST['SunES2'];

$SatAftS1=$_POST['SatAftS1'];
$SatAftS1H=$_POST['SatAftS1H'];
$SatAftS2=$_POST['SatAftS2'];
$SatAftS2H=$_POST['SatAftS2H'];

$SatFuncS1=$_POST['SatFuncS1'];
$SatFuncS1H=$_POST['SatFuncS1H'];
$SatFuncS2=$_POST['SatFuncS2'];
$SatFuncS2H=$_POST['SatFuncS2H'];

$WeeklyCleanH=$_POST['WeeklyCleanH'];
$WeeklyClean=$_POST['WeeklyClean'];
$AltClean=$_POST['AltClean'];
$FuncCleanH=$_POST['FuncCleanH'];
$FuncClean=$_POST['FuncClean'];
$AltFuncClean=$_POST['AltFuncClean'];

$BHMonS1=$_POST['BHMonS1'];
$BHMonS1H=$_POST['BHMonS1H'];
$BHFriS1=$_POST['BHFriS1'];
$BHFriS1H=$_POST['BHFriS1H'];

$XmasDayS1=$_POST['XmasDayS1'];
$XmasDayS1H=$_POST['XmasDayS1H'];
$XmasDayS2=$_POST['XmasDayS2'];
$XmasDayS2H=$_POST['XmasDayS2H'];

$BoxDayLS1H=$_POST['BoxDayLS1H'];
$BoxDayLS1=$_POST['BoxDayLS1'];
$BoxDayLS2H=$_POST['BoxDayLS2H'];
$BoxDayLS2=$_POST['BoxDayLS2'];

$BoxDayES1H=$_POST['BoxDayES1H'];
$BoxDayES1=$_POST['BoxDayES1'];
$BoxDayES2H=$_POST['BoxDayES2H'];
$BoxDayES2=$_POST['BoxDayES2'];

$NYDayLS1H=$_POST['NYDayLS1H'];
$NYDayLS1=$_POST['NYDayLS1'];
$NYDayLS2H=$_POST['NYDayLS2H'];
$NYDayLS2=$_POST['NYDayLS2'];

$NYDayES1H=$_POST['NYDayES1H'];
$NYDayES1=$_POST['NYDayES1'];
$NYDayES2H=$_POST['NYDayES2H'];
$NYDayES2=$_POST['NYDayES2'];

$NYEveS1H=$_POST['NYEveS1H'];
$NYEveS1=$_POST['NYEveS1'];
$NYEveS2H=$_POST['NYEveS2H'];
$NYEveS2=$_POST['NYEveS2'];
$NYEveS3H=$_POST['NYEveS3H'];
$NYEveS3=$_POST['NYEveS3'];
$NYEveS4H=$_POST['NYEveS4H'];
$NYEveS4=$_POST['NYEveS4'];


$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

-------------------------------------------------------------------------

"

;
mail($sendto,$subject,$body)
?>
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,

Liam