cieejayseven — 2012-06-30T11:19:24-04:00 — #1
i want to create a C.O.R(Certifiate of registartion) and class schedule into PDF format to print by the student..but i dont have idea.. my problem is how to get the data where insert by the student in the register form then come out in pdf to print serve as their C.O.R. ...all information that they insert into the register form will need to come out in pdf. i dont know how to start this coding. using PHP language..
marplo — 2012-06-30T11:49:58-04:00 — #2
You can get those data (from form with $POST['fieldname'] , or from mysql table with SELECT), then creade in php a html document wirh those data , and use "dompdf class" to convert html to pdf.
dompdf is free on the net.
rubble — 2012-06-30T11:52:21-04:00 — #3
This will create a pdf but might be a bit to complicated for you to start out with: http://www.fpdf.org/
Why does the output need to be a pdf?
cieejayseven — 2012-06-30T11:59:11-04:00 — #4
for a student purpose.. for a online enrollment system ..
cieejayseven — 2012-06-30T12:09:08-04:00 — #5
gwinh_dev — 2012-06-30T13:46:11-04:00 — #6
First, you need to query the student first
$sql = "SELECT * FROM
student_tbl WHERE student_id=$id and school_year=$sy and term=$term";
Then try to use either of this library:
But if I were you, use the fpdf because it is much simpler and easy to use.
cieejayseven — 2012-07-01T08:04:28-04:00 — #7
cieejayseven — 2012-07-01T08:20:48-04:00 — #8
class PDF extends FPDF
// Page header
// Arial bold 15
// Move to the right
// Line break
$result=mysql_query('select * from student');
// Page footer
// Position at 1.5 cm from bottom
// Arial italic 8
$pdf = new PDF();
ERROR on line 25 >.< "$result=mysql_query('select * from student');" this one