Skip to content

Instantly share code, notes, and snippets.

<?php
require_once __DIR__ . '/vendor/autoload.php';
$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML('<h1>Hello world!</h1>');
$mpdf->Output();
<!DOCTYPE html>
<html>
<head>
<title>Make PDF</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body>
<div class="container">
<form method="post" action="makepdf.php" class="offset-md-3 col-md-6">
<h1 class="m-4">Create Your Own PDF</h1>
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require_once __DIR__ . '/vendor/autoload.php';
// Grab variable
$fname = $_POST['fname'];
function display( )
{
document.write(“DevOpsSchool”);
}
document.write (“First Line <br />”);
display( );
document.write(“DevOpsSchool”);
function display( )
{
document.write(“Welcome to DevOpsSchool <br />”);
}
document.write(“Last Line <br />”);
<html>
<head>
<script>
function showResult(str) {
if (str.length==0) {
document.getElementById("livesearch").innerHTML="";
document.getElementById("livesearch").style.border="0px";
return;
}
if (window.XMLHttpRequest) {
<?php
$xmlDoc = new DOMDocument();
$xmlDoc->load("links.xml");
$x=$xmlDoc->getElementsByTagName('link');
$q=$_GET["q"];
if(strlen($q)>0)
{
$hint="";
for($i=0;$i<($x->length);$i++)
{
<html>
<head>
<script>
function showResult(str) {
if (str.length==0) {
document.getElementById("livesearch").innerHTML="";
document.getElementById("livesearch").style.border="0px";
return;
}
if (window.XMLHttpRequest) {
var mysql = require('mysql');
var db; var setting = { host : "localhost", user : "root", password : "", database : "crudapp" };
function connectDatabase() {
if(!db) {
db = mysql.createConnection(setting);
db.connect(function (err) {
if(!err) {
console.log("Database connected")
;
}