Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "root";
- $password = "123";
- // Create connection
- $conn = mysqli_connect($servername, $username, $password, 'test');
- // Check connection
- if (!$conn) {
- die("Connection failed: " . mysqli_connect_error());
- }
- mysqli_set_charset($conn,"utf8");
- ;
- if ($result = mysqli_query($conn, 'select * from videos'))
- {
- $row=mysqli_fetch_row($result);
- // Free result set
- mysqli_free_result($result);
- }
- mysqli_close($conn);
- include ("mpdf/mpdf.php");
- $mpdf = new mPDF('', 'A4', 14, 'nikosh');
- $mpdf->WriteHTML('');
- $txt = $row[2];
- $mpdf->multiCell(100, 10, $txt, 1, 'L', 0);
- $mpdf->Output('');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement