[CODE]Hi Friends, I have written a code with some example script for generating report in PDF with PHP and MYSQL. But i am unable to fetch the data from my table. So Please help me to solve this issue. Thanks <?php $today=date('Y-m-d'); $hostname = "localhost"; $database = "bdname"; $username = "root"; $password = ""; $conn = mysql_connect($hostname, $username, $password) or die(mysql_error()); mysql_select_db($database, $conn); date_default_timezone_set('UTC'); require('fpdf/fpdf.php'); class PDF_result extends FPDF { function __construct ($orientation = 'P', $unit = 'pt', $format = 'Letter', $margin = 40) { $this->FPDF($orientation, $unit, $format); $this->SetTopMargin($margin); $this->SetLeftMargin($margin); $this->SetRightMargin($margin); $this->SetAutoPageBreak(true, $margin); } function Header () { $this->Image('images/logo.png',100,15,200); // …

Member Avatar
Member Avatar
+0 forum 2

Hello, I am using a code to generate an id for a table.But it is giving 'Conversion from type dbnull to type integer is not valid' exception. Now I know that this is due to the table being an empty set.But it works properly if there is already a row in the table. How to rectify this? [CODE]Private Sub GenerateID() Dim com As New MySqlCommand If conn.State = ConnectionState.Closed Then conn.Open() End If Try com.Connection = conn com.CommandText = "select max(right(cust_id,length(cust_id)-3)) from customer" last = com.ExecuteScalar Catch ex As Exception MsgBox(ex.Message) End Try If conn.State = ConnectionState.Open Then conn.Close() End …

Member Avatar
Member Avatar
+0 forum 6

I'm currently in the process of creating a Windows application much like "Steam". The problem I'm having is that I need to be able to add new games to the list which auto generates a button and the code behind it. I have no idea how to do this. Can anyone help me? Below is the code I used behind the buttons: [CODE] Private Sub btn_KaneLynch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnKaneLynch.Click Dim kane As String = "C:\Program Files (x86)\Steam\steamapps\common\kane and lynch dead men\Launcher.exe" Try Process.Start(kane) Catch ex As Exception MessageBox.Show(System.Runtime.InteropServices.Marshal.GetLastWin32Error()) MessageBox.Show(kane) End Try End Sub[/CODE]

Member Avatar
Member Avatar
+0 forum 1

For example , As i registered in daniweb.com , a mail was sent to my email id and after clicking on that link , i could complete my registration . i want to develop a similar module in php , where the users after signing in , i sent this particular auto-generated link to their email id and confirm their registrations.

Member Avatar
Member Avatar
+0 forum 2

The End.