Generate PDF from HTML with Dompdf in PHP

The Pdf file creation in PHP mainly requires when need to generate the file on the basis of the available data otherwise, simply create it manually with the external applications.

For example – generating the report, the user certificate, etc.

For generating pdf file I am using Dompdf library which generates the downloadable pdf file from HTML.

Generate PDF from HTML with Dompdf in PHP

Read more

Attach Event to Dynamically Created Elements with jQuery

Once the web page is being fully loaded, then the same event handler is not being attached to newly created elements.

It seems like the event handler is being attached conceptually.

When you perform some action on new elements, then the event bind with it not trigger on the new element. But it is working on the elements which are created during the webpage loading.

This problem is common if the event handlers are not correctly attached.

Attach Event to Dynamically Created Elements with jQuery

Read more

Prevent page from submit on Refresh in PHP

If the form is already submitted and the user tries to refresh the webpage then the browser will attempt to resubmit the form.

If you are allowing the user to fill and submit the form for insert data. In this case, if the user refreshes the page then the data is reinserted into the MySQL database table if some action does not perform for preventing it.

In this tutorial, I show you some ways by using which you can avoid the page resubmit.

Prevent page from submit on Refresh in PHP

Read more