php - HTML to PDF , Result columns are empty -


i using following codes create pdf.

first memberinfo.php page contains table name, address, city etc of member mysql database. file in www.example.com/admin folder

second member_pdf.php it used create pdf. in www.example.com/admin/do-pdf/dompdf/ folder

code in memberinfo.php :

<?  include("../include/function.php"); // connect database // create object class $bsq=new bsq(); //use class function connect database $bsq->connect_db();  //================================================================================= $reg_id=$_get["reg_id"];  $where="reg_id='".$_get["reg_id"]."'"; $web_datars=$bsq->webdreamselect('tablename',$where,'','','','');   $member_data=mysql_fetch_array($web_datars); ?>   //this table shown when click on view details link on member's list page...  <table>   <tr>    <td> name </td><td><?=$member_data['name'];?></td>    <td> address </td><td><?=$member_data['address'];?></td>    ..    ..    ..   </tr>  </table> 

code in member_pdf.php :

<?php      require_once("dompdf_config.inc.php");        ob_start();     //be sure file exists, , works outside of web context etc.)     require("http://example.com/admin/memberinfo.php");     $dompdf = new dompdf();     $dompdf->load_html(ob_get_clean());     $dompdf->render();     $dompdf->stream("file.pdf"); ?>     

now problem , pdf created table tds containing $member_data['name'] , $member_data['address'] etc empty.....

see image =

enter image description here


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -