Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please help me #131

Closed
PhenX opened this issue Dec 6, 2012 · 3 comments
Closed

please help me #131

PhenX opened this issue Dec 6, 2012 · 3 comments

Comments

@PhenX
Copy link
Member

PhenX commented Dec 6, 2012

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>

  • { padding: 0; margin: 0; }

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>&nbsp;<?=$_field_grade[0]?></td>

<td>&nbsp;<?=$_field_grade[1]?></td>

<td>&nbsp;<?=$_field_grade[2]?></td>

<td>&nbsp;<?=$_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

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on March 01, 2010 18:14:41
We will response to your post on the support group.

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From seniorit...@gmail.com on March 02, 2010 12:04:05
what is the link of the support group ?

@PhenX
Copy link
Member Author

PhenX commented Dec 6, 2012

From eclecticgeek on March 02, 2010 13:21:04
Is this your post?
http://groups.google.com/group/dompdf/browse_thread/thread/1f855bfd5ac3c433

@PhenX PhenX closed this as completed Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant