Skip to content

Email PDF Attachment with PHP Using FPDF

I want to email a PDF as an attachment that was created using FPDF. My code looks like this, but the attachment never comes through. Anyone familiar with doing this? I’m hoping to use the PHP mail() function. Answer This ended up working for me:

Setting up scripting and mysql database on separate servers

I have a unique setup for a web application that I need to get my head around. I have two servers that will need to talk to each other. Server A will host the actual PHP-based application; Server B will host the MySQL database and the server connection details. Server B will also be within a closed network, s…

PHP input sanitizer function?

What’s a method to sanitize PHP POST data for passing to a mail function? (I prefer a method that’s not part of the mysql_function() family of functions.) I take the data, sanitize it, print it back to the user and send it in an email to a preset address. EDIT: I’m just sending the email to …

how to do this.. backwards?

I currently have: $i = 1; while { echo $i; $i++; } And it shows: 1 2 3 4 etc.. How would I make it display backwards? For example 4 3 2 1 etc.. I basically want to do the exact same thing …

Doctrine 2: Update query with query builder

Hi I’ve got the following query but it doesn’t seem to work. This returns the following error message: Fatal error: Uncaught exception ‘DoctrineORMQueryQueryException’ with message ‘[Semantical Error] line 0, col 38 near ‘testusername WHERE’: Error: ‘testusernam…

dompdf and img tag, image wont show

Here is the HTML just before $dompdf->render() and $dompdf->output() are called: All other invoices display the image fine when viewing in the browser, or printing it, or emailing it as HTML. When I click ‘Generate PDF’ inside of our application, it renders the invoice in PDF, except the log…