Jump to content

gordonisnz

New Members
  • Posts

    8
  • Joined

  • Last visited

gordonisnz's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. You could do a PHp script to connect to the server every 30 seconds, and then use a javascript time/clock script to update every second. the PHP connects will be to get the current/latest tier details. Though, you didn't say how long this timer will go on for ? if its a few minutes or less, the above may not be useful. If its longer - it might.
  2. Hello. Are there any GOOD tutorials about MYSQLI Object orientated coding, and procedural. IE - ONE PAGE that has procedural instructions and DOESNT EVEN BREATHE a sign of object-orientated, and the swapped version. I prefer Procedural. I've found tutorials that have both codes in one page - very confusing.. You use 1 line of procedural, and another line of object orientated & of course its causes errors. I want seperate pages/information. I've been coding for years and now want a new thing added to my site. So I COPY the exact WORKING code i have on a separate script to this new script, and now that same code doesn't work. my current code is here:- $link = mysqli_connect('SITE.com', 'blah', 'Blahpasswrd', 'moreblah'); if ($link->connect_errno) { $GLOBALS["jobs"].="Failed to connect to MySQL: " . $link=>connect_error; save_logs("XXXXXXXXXV06_JOBSCHECK",$GLOBALS["jobs"]); exit(); } $sql = "SELECT * FROM `jobs` WHERE `ID` LIKE '$job%';"; $GLOBALS["jobs"].="\n$sql\n\n";$result = $link->query($sql); $result = $link->query($sql); while($row = mysqli_fetch_assoc($result)) { $text.=print_r($row,true)."\n"; } the error message im getting is:- [10-Jun-2023 23:30:43 Pacific/Auckland] PHP Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given in PATH.php on line 72 [10-Jun-2023 23:35:03 Pacific/Auckland] PHP Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, bool given in PATH.php on line 72 all i want is a list of each line/row of the database that matches.
  3. are there Any GOOD tutorials on PDFP & tables ? http://www.fpdf.org/en/tutorial/tuto5.htm I'm reading the above but its only got one type of data, (i'm looking at the fancy table) from what i see - it just extracts data from a file & inserts it into a data array. HOWEVER, i have data in this format:- Array ( [1] => Array ( [cats] => 12 [kittens] => 8 ) [3] => Array ( [cats] => 3 [kittens] => 1 ) [4] => Array ( [cats] => 2 [kittens] => 1 ) ) (thats just 1 month of data, I have 4-5 months to show so far. ) I HAVE managed to get my data into the correct format. However I have 4 header titles & 4 columns of data in my table - However they're not aligned with each other.. i'm modifying the widths of the columns to try to be underneath the titles - however shouldn't they auto-align ?
  4. Got it going - Just testing. though it doesnt like normal HTML code (it displays the code instead of processing it).. I'll keep trying...
  5. Thanks - I'll try it - HOWEVER i don't want to learn a complete new language (if i can)... my HTML templates already have the fonts etc all sorted.. I guess using this PDF - i need to set all the sizes/fonts etc manually Is there anything that will just convert HTMLoutput to PDF?
  6. Hello. I'm using PHP Smarty, and have generated HTML output. Now i'm trying to convert this into a PDF. (I've got a regular website up & running - just creating monthly reports in PDF). I've found dompdf and set it up, & have all the files correct, However I'm getting an error:- $sm="/home/users/MYPATYH/usr/dompdf/dompdf/vendor/dompdf/dompdf/lib"; ini_set('include_path',ini_get('include_path').":$sm"); Fatal error: Uncaught Error: Class 'DOMPDF' not found in Question:- WHICH file exactly, should be included in the directory, What file is being accessed for "DOMPDF"? can someone recommend a good PDF converter (I've got all the HTML output). with a step-by-step guide as to how to install it. 1) Download files 2) Upload files 3) find directory /usr/path/etc../ etc... 4) include "path to file" (this should be the path to file.php file... - (Exact filename its looking for) My current code is:- require ("/home/users/MYUSERPATH/usr/dompdf/dompdf/autoload.inc.php"); require ("/home/users/MYUSERPATH/usr/dompdf/dompdf/vendor/autoload.php"); $filename = "$file2/report-$dt.pdf"; $dompdf = new DOMPDF(); $dompdf->load_html($output); $dompdf->set_paper('a4', 'portrait'); $dompdf->render(); file_put_contents($filename, $dompdf->output()); ERROR- Fatal error: Uncaught Error: Class 'DOMPDF' not found in ......
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.