Good Oyster
Perch
First, I am not a PHP coder. The PHP pages I use to generate PDF files were written with the help of others! This script was running just fine, no errors, etc., spitting out the PDFs just as nice as can be. However, now it is giving me the following error:
Just in case, here is the code:
I haven't changed anything in the code or the database, etc. The only change was whatever took place when win2 server was reloaded after crashing yesterday. Is this error something I should look for and fix in my code, or is there a setting I need to have tech support look at?[Microsoft][ODBC Microsoft Access Driver]Invalid use of null pointer PHP Notice: Undefined variable: pdfinfo in C:\hshome\wxxxxxe\mxxxxds.com\labels_PDF.php on line 18 PHP Notice: Undefined variable: pdfinfo in C:\hshome\wxxxxxe\mxxxxds.com\labels_PDF.php on line 19 PHP Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver]Invalid use of null pointer , SQL state S1009 in SQLExecDirect in C:\hshome\wxxxxxe\mxxxxds.com\labels_PDF.php on line 19
Just in case, here is the code:
Code:
<?php
define('FPDF_FONTPATH','PDF/font/');
require_once('PDF/PDF_Label.php');
$odbc = odbc_connect ('databasename', 'root', '') or die( "Could Not Connect to ODBC Database!" );
if(!($pdfinfo == "nada")){
$query = odbc_exec($odbc, stripslashes($pdfinfo)) or die (odbc_errormsg());
$pdf2 = new PDF_Label('5160', 'mm', 1, 2);
$pdf2->Open();$pdf2->AddPage();
// Print labels
while($Row=odbc_fetch_array($query)){$pdf2->Add_PDF_Label(sprintf("%s\n%s\n%s\n%s, %s, %s", "", "$Row[Firstname] $Row[Lastname]", "$Row[Address1] $Row[Address2]", "$Row[City]","$Row[State]","$Row[Zip]"));}$pdf2->Output();
}
?>