You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$row_year_sem = mysql_query("SELECT studentyear,semester from
accountsubject where account_id = '$account_id' group by
studentyear,semester ORDER BY studentyear, semester");
FROM (accounts a left join accountsubject accs on a.account_id =
accs.account_id) left join subject s on accs.subjectcode = s.subjectcode
WHERE a.login = '$username' and studentyear = '$studentyear' and semester =
'$semester' ";
//echo $_query_grade;
$_row_grade = mysql_query($_query_grade);
//mysql_fetch_assoc ; instead na 0 pede mo ilagay na assc.subjcode
while($_field_grade = mysql_fetch_array($_row_grade)){// ito instead na
mysql_fetch_row array halos parehas lang ang pinagkaiba lang naman niya pag
mareming records kukunin sa db yungiba naexplain ko naman na
Original author: seniorit...@gmail.com (March 01, 2010 09:32:01)
What would you like dompdf to do:
i already put the dompdf files on my root directory
what is the next step i need to do ???
i want to convert html and php code to be output in pdf files
here is my code
Do you have an example:
<?php
if($_GET["un"]) {
// ob_clean(); // emptying the buffer (v >= 4.2)
// Dialog for the download
header("content-type: application/octet-stream");
// only for application type: application/octet-stream !
header("Content-Disposition: attachment; filename=".$_GET["un"].".pdf");
// open with PDF
header("Content-type: application/pdf");
flush(); // send the buffer
readfile($_GET["un"]); // send the file
}
//Include database connection details
require_once('config.php');
//Array to store validation errors
$errmsg_arr = array();
//Validation error flag
$errflag = false;
//Connect to mysql server
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
if(!$link) {
die('Failed to connect to server: ' . mysql_error());
}
//Select database
$db = mysql_select_db(DB_DATABASE);
if(!$db) {
die("Unable to select database");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333333;
}
</style>
<body>
<br>
<br>
<center>
<?php
$username = $_GET['un'];
$row = mysql_query("Select fname,lname,course,year,account_id from accounts
where login = '$username'");
$count = mysql_num_rows($row);
if($count > 0 ){
$field = mysql_fetch_row($row);
$fname = $field[0];
$lname = $field[1];
$course= $field[2];
$student_year = $field[3];
$account_id = $field[4];
echo "Student Name: $fname $lname <br> Course:$course <br>Year:
$student_year ";
}else echo 'Username not found';
?>
<br><br>
<?php
$row_year_sem = mysql_query("SELECT studentyear,semester from
accountsubject where account_id = '$account_id' group by
studentyear,semester ORDER BY studentyear, semester");
while($_field_year_sem = mysql_fetch_array($row_year_sem)){
$studentyear = $_field_year_sem[0];
$semester = $_field_year_sem[1];
echo "Student Year: $studentyear <br>Semester: $semester";
?>
<br>
<br>
<table border="1" frame="void" border="0" width="70%" height="100">
<tr>
<td><center>Subject</center></td>
<td><center>Description</center></td>
<td><center>Unit</center></td>
<td><center>Grade</center></td>
</tr>
<?
$_query_grade = "SELECT s.subjectcode, s.subjectdesc,s.unit, accs.grade
FROM (accounts a left join accountsubject accs on a.account_id =
accs.account_id) left join subject s on accs.subjectcode = s.subjectcode
WHERE a.login = '$username' and studentyear = '$studentyear' and semester =
'$semester' ";
//echo $_query_grade;
$_row_grade = mysql_query($_query_grade);
//mysql_fetch_assoc ; instead na 0 pede mo ilagay na assc.subjcode
while($_field_grade = mysql_fetch_array($_row_grade)){// ito instead na
mysql_fetch_row array halos parehas lang ang pinagkaiba lang naman niya pag
mareming records kukunin sa db yungiba naexplain ko naman na
?>
<tr>
<td> <?=$_field_grade[0]?></td>
<td> <?=$_field_grade[1]?></td>
<td> <?=$_field_grade[2]?></td>
<td> <?=$_field_grade[3]?></td>
</tr>
<?
}
?>
</table>
<br><br>
<?
}
?>
1 = 99-100 1-25 = 96-98 1.50 = 93-95 1.70 = 90-92
<br>2.00 = 87-89 2.25 = 84-86 2.50= 81-83 2.75= 78-80
<br>3.00=75-77 5.00 = below75
</center>
</body>
</html>
Original issue: http://code.google.com/p/dompdf/issues/detail?id=125
The text was updated successfully, but these errors were encountered: