andretanguy Posted May 11, 2007 Share Posted May 11, 2007 im trying to insert this: the database connection has already been made and is working. userid is posted from the previous page and is working - for the sake of this, lets say the userid = 101 userid is referenced like so: $l_userid <? $query = "SELECT name, userid FROM AD747_LISTING WHERE id =".$l_userid; $list_array = mysql_query($query); if($row = mysql_fetch_array($list_array)) { $name = $row['name']; $userid = $row['userid']; } if(!empty($userid)) { $query = "SELECT customers_firstname, customers_lastname, customer_email_address, phone, mobile FROM USERS WHERE userid =".$l_userid; $user_array = mysql_query($query); if($row = mysql_fetch_array($user_array)) { $firstname = $row['customers_firstname']; $lastname = $row['customers_lastname']; $phone = $row['phone']; $mobile = $row['mobile']; $email = $row['customer_email_address']; } }?> <? $pdf->Cell( 30, 5, "Contact Name:", 0, 0, 'L' ); $pdf->Cell( 0, 5, "$firstname $lastname", 0, 1, 'L' ); $pdf->Cell( 30, 5, "Owner Email:", 0, 0, 'L' ); $pdf->Cell( 0, 5, $email, 0, 1, 'L' ); $pdf->Cell( 30, 5, "Contact Tel:", 0, 0, 'L' ); $pdf->Cell( 0, 5, $phone, 0, 1, 'L' ); $pdf->Cell( 30, 5, "Contact Mobile:", 0, 0, 'L' ); $pdf->Cell( 0, 5, $mobile, 0, 1, 'L' ); ?> any help would be much appreciated André Quote Link to comment https://forums.phpfreaks.com/topic/50922-solved-fpdf-php-and-inserting-data-from-a-second-table/ Share on other sites More sharing options...
andretanguy Posted May 11, 2007 Author Share Posted May 11, 2007 forgot to say that no data is being displayed at all for these fields. Quote Link to comment https://forums.phpfreaks.com/topic/50922-solved-fpdf-php-and-inserting-data-from-a-second-table/#findComment-250460 Share on other sites More sharing options...
andretanguy Posted May 11, 2007 Author Share Posted May 11, 2007 fixed it! cheers André Quote Link to comment https://forums.phpfreaks.com/topic/50922-solved-fpdf-php-and-inserting-data-from-a-second-table/#findComment-250468 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.