-
Posts
812 -
Joined
-
Last visited
Everything posted by techker
-
will check it out.its works fine do..i just inserted a br and all good
-
ok so i got it going with this but i need to make each echo on a diffrent line??cause now it shows all in one.. <? header("Content-type: application/vnd.ms-word"); header("Content-Disposition: attachment;Filename=document_name.doc"); header("Pragma: no-cache"); $ID=$_GET['ID']; require "config.php"; $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB = mysql_select_db($dbname); $ID=$_GET['ID']; $q3 = "select * from APPLICATIONS where ID ='$ID'"; $res3 = mysql_query($q3); $row3 = mysql_fetch_assoc($res3); ?> <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html;charset=utf-8" /> </head> <body> <? echo $row3['PERS_F_NAME']; echo $row3['PERS_L_NAME']; echo $row3['PERS_DATE_BIRTH']; echo $row3['PERS_SSN']; echo $row3['PERS_DRIVERS_L']; echo $row3['PERS_ADD']; echo $row3['PERS_CITY']; echo $row3['PERS_CODE']; echo 'Less then 2 years'; echo $row3['PERS_ADD_2']; echo $row3['PERS_CITY_2']; echo $row3['PERS_CODE_2']; echo $row3['PERS_NUMBER']; echo $row3['PERS_CELL']; echo $row3['PERS_FAX']; echo $row3['EMPL_E']; echo $row3['EMPL_ADD']; echo $row3['EMPL_CITY']; echo $row3['EMPL_CODE']; echo $row3['EMPL_TYPE']; echo $row3['EMPL_SINCE']; echo $row3['EMPL_P']; echo $row3['EMPL_SUP']; echo $row3['EMPL_N']; echo $row3['EMPL_GS']; echo 'Less then 2 years'; echo $row3['EMPL_2_E']; echo $row3['EMPL_2_ADD']; echo $row3['EMPL_2_CITY']; echo $row3['EMPL_2_CODE']; echo $row3['EMPL_2_TYPE']; echo $row3['EMPL_2_SINCE']; echo $row3['EMPL_2_P']; echo $row3['EMPL_2_SUP']; echo $row3['EMPL_2_N']; echo $row3['EMPL_2_GS']; echo 'Assets & liabilities'; echo $row3['OTHER_OWN_RENT']; echo $row3['OTHER_OWN_RENT_D']; echo $row3['OTHER_OWN_RENT_V']; echo $row3['OTHER_OWN_RENT_AM']; echo $row3['OTHER_OWN_RENT_MP']; echo 'Assets & liabilities'; echo $row3['OTHER_CC_REER']; echo $row3['OTHER_CC_REER_D']; echo $row3['OTHER_CC_REER_V']; echo $row3['OTHER_CC_REER_AM']; echo $row3['OTHER_CC_REER_MP']; echo 'Assets & liabilities'; echo $row3['OTHER_INV_CAR']; echo $row3['OTHER_INV_CAR_D']; echo $row3['OTHER_INV_CAR_V']; echo $row3['OTHER_INV_CAR_AM']; echo $row3['OTHER_INV_CAR_MP']; echo 'Assets & liabilities'; echo $row3['OTHER_OTHER_L']; echo $row3['OTHER_OTHER_L_D']; echo $row3['OTHER_OTHER_L_V']; echo $row3['OTHER_OTHER_L_AM']; echo $row3['OTHER_OTHER_L_MP']; echo 'EMAIL'; echo $row3['EMAIL']; echo 'Accepted therms and conditions'; echo $row3['ACCEPT']; ?> </body> </html> <?php $vExcelFileName="export". ".doc"; header("Content-type: application/x-ms-download"); //#-- build header to download the excel file header("Content-Disposition: attachment; filename=$vExcelFileName"); header('Cache-Control: public'); echo "hai"; ?>
-
even if i only put echo 'php'; echo $row3['PERS_F_NAME']; Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/autosspe/public_html/admin/loan/word.php on line 21
-
Hey guys i found this script that works great for what i need .. se i have this script that i did for my body (loan application) now i would like to export the info in a word doc <?php $ExcelFileName="test.doc"; header("Content-type: application/x-ms-download"); header("Content-Disposition: attachment; filename=$ExcelFileName"); header('Cache-Control: public'); $content=<<<EOD echo 'php'; whatever you want to write here including a php script it will be included in a string and then go in the output for a doc file EOD; echo $content; ?> so im trying to eco all the content in the database.. i tryed all the DB connection is there.. ao i place this after the (echo 'php' while($info = mysql_fetch_array($fileLIST)){; echo $info['PERS_F_NAME']; }; i get this? Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/autosspe/public_html/admin/loan/word.php on line 21
-
nice thx i will try it out.
-
it only shows if it is empty..but its not by default i have a 1 in it. so it would be if "deal" show image.. or if table ==deal show..
-
Hey guys i have a query echo (empty($row['deal'])? "empty": "not empty"); //result not empty but i need it to show the "not empty" if its "deal". by default it is a "1" when i select the row to be a deal it updates the table and inserts "Deal".
-
Hey guys i got my export page to work but it looks super ugly..lol first of i can separate the lines with txt and the colums are not adjusting to the txt in it? like information line hear information 2 line hear.. Where the spaces are i want text.. $csv_output = '"PERSONAL","INFORMATION"'; $csv_output .= "\015\012"; $result = mysql_query("select * from APPLICATIONS WHERE ID= '$ID'"); while($row = mysql_fetch_array($result)) { $csv_output .= '"'.$row[PERS_L_NAME].'","'.$row[PERS_F_NAME].'"'."\n"; $csv_output .= '"'.$row[PERS_DATE_BIRTH].'","'.$row[PERS_SSN].'"'."\n"; $csv_output .= '"'.$row[PERS_DRIVERS_L].'","'.$row[PERS_CODE].'"'."\n"; $csv_output .= '"'.$row[PERS_ADD].'","'.$row[PERS_CITY].'"'."\n"; $csv_output .= '"'.$row[PERS_ADD_2].'","'.$row[PERS_CITY_2].'","'.$row[PERS_CODE_2].'"'."\n"; $csv_output .= '"'.$row[PERS_NUMBER].'","'.$row[PERS_CELL].'","'.$row[PERS_FAX].'"'."\n"; $csv_output .= '"'.$row[EMPL_E].'","'.$row[EMPL_CITY].'"'."\n"; $csv_output .= '"'.$row[EMPL_ADD].'","'.$row[EMPL_CODE].'"'."\n"; $csv_output .= '"'.$row[EMPL_TYPE].'","'.$row[EMPL_SINCE].'"'."\n"; $csv_output .= '"'.$row[PERS_L_NAME].'","'.$row[PERS_F_NAME].'"'."\n"; $csv_output .= '"'.$row[EMPL_P].'","'.$row[EMPL_N].'"'."\n"; $csv_output .= '"'.$row[EMPL_SUP].'","'.$row[EMPL_GS].'"'."\n"; $csv_output .= '"'.$row[PERS_L_NAME].'","'.$row[PERS_F_NAME].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_E].'","'.$row[EMPL_2_ADD].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_CITY].'","'.$row[EMPL_2_CODE].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_TYPE].'","'.$row[EMPL_2_SINCE].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_P].'","'.$row[EMPL_2_N].'"'."\n"; $csv_output .= '"'.$row[EMPL_2_SUP].'","'.$row[EMPL_2_GS].'"'."\n"; $csv_output .= '"'.$row[OTHER_OWN_RENT].'","'.$row[OTHER_OWN_RENT_D].'","'.$row[OTHER_OWN_RENT_V].'","'.$row[OTHER_OWN_RENT_AM].'","'.$row[OTHER_OWN_RENT_MP].'"'."\n"; $csv_output .= '"'.$row[OTHER_CC_REER].'","'.$row[OTHER_CC_REER_D].'","'.$row[OTHER_CC_REER_V].'","'.$row[OTHER_CC_REER_AM].'","'.$row[OTHER_CC_REER_MP].'"'."\n"; $csv_output .= '"'.$row[OTHER_INV_CAR].'","'.$row[OTHER_INV_CAR_D].'","'.$row[OTHER_INV_CAR_V].'","'.$row[OTHER_INV_CAR_AM].'","'.$row[OTHER_INV_CAR_MP].'"'."\n"; $csv_output .= '"'.$row[OTHER_OTHER_L].'","'.$row[OTHER_OTHER_L_D].'","'.$row[OTHER_OTHER_L_V].'","'.$row[OTHER_OTHER_L_AM].'","'.$row[OTHER_OTHER_L_MP].'"'."\n"; $csv_output .= '"'.$row[email].'","'.$row[sTATUS].'"'."\n"; $csv_output .= '"'.$row[DATE].'","'.$row[ACCEPT].'"'."\n"; $csv_output .= "\015\012"; } //You cannot have the breaks in the same feed as the content. header("Content-type: application/vnd.ms-excel"); header("Content-disposition: csv; filename=document_" . date("Ymd") . ".csv"); print $csv_output; exit;
-
i needed to go tru one by one to notice that i was missing a table associated with the values.. and a space like this ' me' i hate doing big query's like this..thx!
-
this is the rest if (!$query) { die('Invalid query: ' . mysql_error()); } $id= mysql_insert_id(); echo "<p>This file has the following Database ID: <b>$id</b>"; echo "You'll be redirected to Home Page after (2) Seconds"; echo "<meta http-equiv=Refresh content=2;url=FILL.php>"; ?> [code=php:0]
-
hey guys im going nuts with this and i cant find the error why it does not work?? $connection = mysql_connect($dbhost, $dbusername, $dbpass); $SelectedDB = mysql_select_db($dbname); //Writes the information to the database $query =("INSERT INTO `APPLICATIONS` (PERS_L_NAME, PERS_F_NAME, PERS_DATE_BIRTH, PERS_SSN, PERS_DRIVERS_L, PERS_ADD, PERS_CITY, PERS_CODE, PERS_ADD_2, PERS_CITY_2, PERS_CODE_2, PERS_NUMBER, PERS_CELL, PERS_FAX, EMPL_E, EMPL_ADD, EMPL_CITY, EMPL_CODE, EMPL_TYPE, EMPL_SINCE, EMPL_P, EMPL_N, EMPL_SUP, EMPL_GS, EMPL_2_E, EMPL_2_ADD, EMPL_2_CITY, EMPL_2_CODE, EMPL_2_TYPE, EMPL_2_SINCE, EMPL_2_P, EMPL_2_N, EMPL_2_SUP, EMPL_2_GS, OTHER_OWN_RENT, OTHER_OWN_RENT_D, OTHER_OWN_RENT_V, OTHER_OWN_RENT_AM, OTHER_OWN_RENT_MP, OTHER_CC_REER, OTHER_CC_REER_D, OTHER_CC_REER_V, OTHER_CC_REER_AM, OTHER_CC_REER_MP, OTHER_INV_CAR, OTHER_INV_CAR_D, OTHER_INV_CAR_V, OTHER_INV_CAR_AM, OTHER_INV_CAR_MP, OTHER_OTHER_L, OTHER_OTHER_L_D, OTHER_OTHER_L_V, OTHER_OTHER_L_AM, OTHER_OTHER_L_MP, EMAIL, ACCEPT, STATUS, DATE) ". "VALUES ( '$PERS_L_NAME','$PERS_F_NAME','$PERS_DATE_BIRTH','$PERS_SSN','$PERS_DRIVERS_L','$PERS_ADD','$PERS_CITY','$PERS_CODE','$PERS_ADD_2','$PERS_CITY_2', '$PERS_CODE_2','$PERS_NUMBER','$PERS_CELL','$PERS_FAX','$EMPL_E','$EMPL_ADD','$EMPL_CITY','$EMPL_CODE','$EMPL_TYPE','$EMPL_SINCE','$EMPL_P', '$EMPL_N','$EMPL_SUP','$EMPL_GS','$EMPL_2_E','$EMPL_2_ADD','$EMPL_2_CITY','$EMPL_2_CODE','$EMPL_2_TYPE','$EMPL_2_SINCE','$EMPL_2_P','$EMPL_2_N', '$EMPL_2_GS','$OTHER_OWN_RENT','$OTHER_OWN_RENT_D','$OTHER_OWN_RENT_V','$OTHER_OWN_RENT_AM','$OTHER_OWN_RENT_MP','$OTHER_CC_REER', '$OTHER_CC_REER_D','$OTHER_CC_REER_V','$OTHER_CC_REER_AM','$OTHER_CC_REER_MP','$OTHER_INV_CAR','$OTHER_INV_CAR_D','$OTHER_INV_CAR_V', '$OTHER_INV_CAR_AM','$OTHER_INV_CAR_MP','$OTHER_OTHER_L','$OTHER_OTHER_L_D','$OTHER_OTHER_L_V','$OTHER_OTHER_L_AM','$OTHER_OTHER_L_MP', '$EMAIL','$ACCEPT','$STATUS','$DATE')");
-
cause it is not me that will check every day when the update is done to check the products that were inserted and the one's that are missing...
-
? if it is in the catalogue DB set it to 1 if not set it to 0
-
hey guys how would i be able to take a table and check in anoter table if it is there ..if not put like (o) if it is (1).. this checks the DB for the product SELECT TbItemInventory.Name, xcart_products.productcode, TbItemInventory.QuantityOnHand, xcart_products.avail,xcart_products.productid,TbItemInventory.ID,TbItemInventory.xcart FROM TbItemInventory, xcart_products WHERE ( TbItemInventory.Name = xcart_products.productcode )
-
nice .i needed to have numbers in DB or that error would happend.i will change it .thx for the help
-
hey guys i'm trying out this ajax rating script and i get this division by zero: Warning: Division by zero in /home/open2sha/public_html/Rate/index.php on line 37 <?php // very quick & dirty code $sql = mysql_query("SELECT * FROM tut_starRating"); $rows = mysql_num_rows($sql); if ($rows == 0) { echo "no rows found"; } else { while($row = mysql_fetch_array($sql)) { $tmp_rating = $row['rating'] / $row['votes']; $rating = round(($tmp_rating*2), 0)/2; // round up or down to nearest half print("<li><div class='rating' id='rating_".$row['articleId']."'>".$rating."</div><div id='starRatingFeedback_".$row['articleId']."'></div></li>"); } } ?> </ol>
-
Hey guys on some site i see when you click a link it opens a new page.but on top of that page there is a bar that has like return to site or rate site... so im guessing the bottom part is an iframe (site cliked on) how can i set up the top bar?
-
i think i got it.. SELECT TbItemInventory. * FROM TbItemInventory LEFT JOIN xcart_products ON TbItemInventory.Name = xcart_products.productcode WHERE xcart_products.productcode IS NULL LIMIT 0 , 30 seems to be working good
-
hey guys i need to compare 2 databases and see what is missing in one? whats in db1 missing in db2... how would this go about?with a search query?
-
i have it as varchar.. if i change it will i loose what i have in there?
-
hey guys i have a car dealer script and i want to make the interface look better.. so i want to put icons(door locks-ac-auto-manu-4 door..) my issue is the if.. so im guessing <? if ( $row3['Door_locks'] == 1 ) { echo "<img src="icons/Doors.png" width="32" height="32" border="0">";} ?>
-
Hey guys in my database i have a colum Retail_price in it the numbers are seperated by, so :9,245$ so my query $q4 ="SELECT sum( Retail_price ) AS TotalCount FROM cars"; $res4 = mysql_query($q4); $row4 = mysql_fetch_assoc($res4) works but only counts the nember before , ....??