Jump to content

Recommended Posts

Posted

Ok this is what i have now:

 

//If the form is submitted
if(isset($_POST['submit'])) {
	$name = trim($_POST['Student']);
	$tutor = trim($_POST['TutorGroup']);
	$staff = trim($_POST['StaffMember']);
	$doi = trim($_POST['DateofIncident']);
	$period = trim($_POST['period']);
	$subject1 = trim($_POST['Subject1']);										
	$C1 = trim($_POST['C1']);	
	$C2 = trim($_POST['C2']);	
	$C3 = trim($_POST['C3']);	
	$C1Rule = trim($_POST['C1Rule']);
	$C2Rule = trim($_POST['C2Rule']);
	$C3Rule = trim($_POST['C3Rule']);		
	$Signed = trim($_POST['Signed']);
	$Time = trim($_POST['Time']);			
	$emailTo = '[email protected]';
	$subject="C3 Referral Form";
	//Plain text email: $body = "Student Name: $name \n\n Tutor Group: $tutor \n\n Staff Member: $staff \n\n Date of Incident: $doi \n\n Period: $period \n\n Subject: $subject1 \n\n C1 Rule broken: $C1Rule \n\n C2 Rule Broken: $C2Rule \n\n C3 Rule Broken: $C3Rule \n\n C1 Explanation: $C1 \n\n C2 Explanation: $C2 \n\n C3 Explanation: $C3 \n\n Time sent to BFL: $Time \n\n Signed: $Signed \n\n";
	$headers = "From: " . $emailTo . "\r\nReply-To: " . $emailTo;
	$headers .= 'MIME-Version: 1.0' . "\r\n";
	$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
	$message = '
	
	
		C3 Referral Form
	
	
	C3 Referral Form
</pre><table width="793" height="224" border="0">
 
   Name of Student:
   ' . $name . '
   Tutor Group:
   ' . $tutor . '
 
 
   Staff Member:
   ' . $staff . '
   Date of Incident:
   ' . $doi . '
 
 
   Subject:
   ' . $subject1 . '
   Period:
   ' . $period . '
 
</table><br><p>Reasons why the warnings were given:</p><br><table width="793" height="251" border="1">
 
    
   Rule Broken
   Explanation of Incidents
 
 
   C1
   ' . $C1Rule . '
   ' . $C1 . '
 
 
   C2
   ' . $C2Rule . '
   ' . $C2 . '
 
 
   C3
   ' . $C3Rule . '
   ' . $C3 . '
 
</table><br><p> </p><br><table width="630" height="114" border="0">
 
   Exact time sent to BfL Centre:
   ' . $Time . '
 
 
   Signed:
   ' . $Signed . '
 
</table><br><p> </p><br>	<br>	<br>	';<br><br>	mail($emailTo, $subject, $message, $headers);<br><br>	$emailSent = true;<br>}<br>?><br>       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><br><br><br><br><title>C3 Referral Form</title><br><meta http-equiv="content-type" content="text/html;charset=utf-8"><br><meta http-equiv="Content-Style-Type" content="text/css"><br><br><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script><br><script src="jquery.validate.pack.js" type="text/javascript"></script><br><br><script type="text/javascript"><br />
$(document).ready(function(){<br />
	$("#contactform").validate();<br />
});<br />
</script><br><br><style type="text/css"><br />
body {<br />
	font-family:Arial, Tahoma, sans-serif;<br />
}<br />
#contact-wrapper {<br />
	width:880px;<br />
	border:1px solid #e2e2e2;<br />
	background:#f1f1f1;<br />
	padding:20px;<br />
}<br />
#contact-wrapper div {<br />
	clear:both;<br />
	margin:1em 0;<br />
}<br />
#contact-wrapper label {<br />
	display:block;<br />
	float:none;<br />
	font-size:16px;<br />
	width:auto;<br />
}<br />
form#contactform input {<br />
	border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;<br />
	border-style:solid;<br />
	border-width:1px;<br />
	padding:5px;<br />
	font-size:16px;<br />
	color:#333;<br />
}<br />
form#contactform textarea {<br />
	font-family:Arial, Tahoma, Helvetica, sans-serif;<br />
	font-size:100%;<br />
	padding:0.6em 0.5em 0.7em;<br />
	border-color:#B7B7B7 #E8E8E8 #E8E8E8 #B7B7B7;<br />
	border-style:solid;<br />
	border-width:1px;<br />
}<br />
	</style><br><br><br><br><h1 align="center">C3 Referral Form</h1><br><p align="center">This form is to be completed if a student chooses to be sent to the BfL Centre and MUST BE COMPLETED THE SAME DAY.</p><br><div id="contact-wrapper">


    Name of Student:
	
   
   
       Tutor Group:
	



	Staff Member:
	



	Date of Incident:
	



	Period:
	

   
	Subject:
	

   
   
 
    
   Rule Broken
   Explanation of Incident
 
 
   C1
   
   
     

 
 
   C2
   
   
 
 
   C3
   
   
 


	Exact time sent to BfL:
	


	Signed:
	

   

     
   

</div><b

 

I could leave it as it is now as it's at the point where they could use it, but i want to do the following:

On the form itself (going away from the email bit for a moment) i'd like to have Two boxes on one line, im not sure how to achive this? doing it the dumb person way of dragging the box and plonking it next to the other one just makes it squash next to the other one

Posted (edited)

Morning, i have another issue, hopefully just a simple fix this time...

 

If i have check boxes when checked and submitted to email they say "on" or are just blank, is there a way to change this "on" to "yes" ?

 

EDIT: never mind, that was incredibly simple, i blame the fact it's morning

Edited by mrbios

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...