Jump to content

lional

Members
  • Posts

    271
  • Joined

  • Last visited

Everything posted by lional

  1. Hi All I am writing an application where one page uploads an image to my webserver. I would like the next page to display that image but making it smaller to fit on the page but I would still like the image to be in proportion. Is this poissible in PHP Thanks Lional
  2. Hi All I have created a script that uploads a image to the webserver. I need to create a simple progress bar that shows the status, filesize and percentage that has been uploaded. I have been searching google but that all seems like overkill I am attaching my code snippet for the upload of the file. If anyonr can assist or point me in the right direction it will be greatly appreciated <form name="customer" enctype="multipart/form-data" action="select_file.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="7000000"> Filename : <input type="file" name="userfile"><br><br><br> <input type="submit" value="Upload Image" name="submit"> Thanks for any assistance Lional
  3. Thanks One more thing. If I upload a file using move_uploaded_file it works fine if the file is about 500K but for larger files it reports the file size as 0 and won't upload the file
  4. Hi All I am busy with a script that uploads a file to the webserver and then sends the file as an attachment. After I have mailed it I would like to delete the file from the directory on the webserver. Is this poissible with PHP Thanks Lional
  5. Hi Barand I have tried your ajax and I just need to make a small change. The instead of an initial text box I would like a dropdown pulled from a mysql table. Can you give me some pointers please Thanks Lional
  6. Hi Barand What I need is an all on all levels. The app I need to do is the following. I need to list documents so my first search criteria will be a search field which is a dropdown. This must have an all field. Id the user selects the all then it will list all of the authors. It also has an all field. If the user selects the all again then all the provinces are listed. If he selects the all again, then all of the outcomes are displayed where he can select the relevent outcome or again select all. Any help will be appreciated Thanks Lional
  7. Hi All I am trying to create a shopping cart that only has one add to basket button on the bottom of the page, but next to each product is a text box. If the text bos is greater than 0 it is added to the cart. This enables multiple products to be added to the shopping cart in one movement. Is this possible with PHP or must Javascript be used Thanks in advance Lional
  8. Thanks Barand I am not that experienced in PHP so excuse my next question? What do you mean about creating a temporay table from my joined data. I have the cascading menu working fine except for the all section Thanks in advance Lional
  9. Hi all I have tried Barend's baaselect and it is an excellent script. I would know if there is anyway that this can be adapted to do the following. Using the script as is and adding an all option so that if for example we are looking for property in a province we can select all that will cascade to list all the cities available and a city can then be chosen and again all can be chosen etc Any help will be appreciated Thanks Lional
  10. Hi All I have a site where the user fills in a form and then the output of this form gets written to a mysql database. I would like to create a pdf by pulling the data from the database. I have done this before and my only problem is that the form however has checkboxes and radio buttons that I would like to recreate on the pdf document that can be printed. Is this possible Thanks in advance Lional
  11. Thankyou much appreciated Lional
  12. it still does it. I have it working on another sscipt with an identical script and it works fine on that site
  13. Hi All I am trying to mail from php and what is hapenning is that the mail comes through to the web client with the senders email address which is coccect but it adds the header to the email address eg. info@it-people.co.zaMIME-Version: 1.0 $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: $mail_out"; }}} // And now mail it! if ($name_out && $telephone_out && $mail_out) { mail($to, $my_subject, $my_message, $headers); } Any help will be appreciated Thanks Lional
  14. Hi All I have been using hvmenu from dynamic drive, but all mu menu items and submenu items have been hard coded. I would like to pull these from a mysql table.Is there templates available that would do this Thanks in advance Lional
  15. Hi All I am trying to create an online form where the user sends a mail. I would like to capture the from email address without the user having to put it in, so when I receive the mail I know who the mail is from. is this possible Thanks in advance Lional
  16. I am fairly new to php so firstly what is the php pear calsses and just point me in the right direction. I don't what the script to be written for me, but just a few pointers
  17. Hi All I am trying to write a script but before I start I would like to know if it is possible. I want to use an excel spreadsheet or a csv file to import data into a mysql products table that will update the products table with the spreadsheet. Is this possible Thanks Lional
  18. I have written the first section of the query for the member details, but the second section for the interests I am in a situation where II don't know where to begin
  19. Hi All I have written a form to capture a members details. This updates the members details. On the form is a list of checkboxes that lists the various interests. The interests updates another table in the form of the memberID and the interest/s that they selected. When I want to edit the form I need to pull the info from the tables. The first table is fine but I am stuck with the one with the interests. The data is displayed as such 1 reading 1 football The number 1 is the client number, but the interests will differ from member to member. I would like to pull the interests and use this info to check the checkbox if that interest was previously selected. Is this done with arrays, and if so could someone please point me in the right direction Regards Lional
  20. Is there anyway to export the table structure and data from mssql and import in into mysql 5. The mssql database has stored procedures Thanks Lional
  21. Hi All I have a small problem, I need to insert certain characters like the comma, and single quotation mark using the INSERT command. Is there anyway that this can be done Thanks Lional
  22. Hi All Quick question Is it possible through php to have a create pdf button on the page on my site, and then it will create that entire page to a pdf document. Thanks Lional
  23. Hi All I am using the tcpdf script from www.tecnick.com I have one small problem. I am trying to create a online pdf catalog if the following format: Image then a list of the finishes, then a list of the dimensions, then the price, but it formats it with the image, then below the image, the list of finishes, then below that the dimensions, and below that the price. I would like them to all be along side each other. I have attached my script, please let me know if there is anyone that can help me. <?php ob_start(); $catid_out = $_GET['catid']; include 'includes/conn_db.php'; $doc_title = "test title"; $doc_subject = "test description"; $doc_keywords = "test keywords"; require_once('config/lang/eng.php'); require_once('tcpdf.php'); // require_once('DBQueryClass.inc.php'); //create new PDF document (document units are set by default to millimeters) $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true); // set document information $pdf->SetCreator(PDF_CREATOR); $pdf->SetAuthor(PDF_AUTHOR); $pdf->SetTitle($doc_title); $pdf->SetSubject($doc_subject); $pdf->SetKeywords($doc_keywords); //set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); //set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); $pdf->SetHeaderMargin(PDF_MARGIN_HEADER); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); //$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); //set image scale factor $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA)); $pdf->setLanguageArray($l); //set language items //initialize document $pdf->AliasNbPages(); $query4 = "SELECT * from Products WHERE cat_id = '$catid_out' AND active='1'"; $result4 = mysql_query($query4, $conn); $productCount = 0; while ($row4 = mysql_fetch_assoc($result4)){ if(($productCount % 5) == 0) { $pdf->AddPage(); } $productItem = "<table align=\"left\"><tr><td>"; $thumbLocation = "images/products/thumbs/" . $row4['thumb']; $productItem .= "<img src=\"$thumbLocation\" align=\"left\">"; $productItem .= "</td><td>"; $productItem .= $row4['prod_code']; $productItem .= "<br>"; $productItem .= "<b>Finishes</b><br>Antique Black<br>Antique Bronze<br>Antique Silver"; $productItem .= "<br>"; if ($row4['width'] != 0 || $row4['width'] != "" || $row4['height'] != 0 || $row4['height'] != "" || $row4['cp'] != 0 || $row4['cp'] != "" || $row4['diameter'] != 0 || $row4['diameter'] != "") { $productItem .= "<b>Dimensions</b>"; $productItem .= "<br>"; } if ($row4['width'] != 0 || $row4['width'] != "") { $productItem .= "Width - "; $productItem .= $row4['width']; $productItem .= "<br>"; } if ($row4['height'] != 0 || $row4['height'] != "") { $productItem .= "Height - "; $productItem .= $row4['height']; $productItem .= "<br>"; } if ($row4['cp'] != 0 || $row4['cp'] != "") { if ($row4['cp'] == 'cp') { $cp_out = 'Centre Pin'; } else { $cp_out = $row4['cp']; } $productItem .= "Pin to Pin - "; $productItem .= $$cp_out; $productItem .= "<br>"; } if ($row4['diameter'] != 0 || $row4['diameter'] != "") { $productItem .= "Diameter - "; $productItem .= $row4['diameter']; $productItem .= "<br>"; } $productItem .= "</td>"; $productItem .= "Price R " . $row4['price']; $productItem .= "<td>"; $productItem .= "</tr></table>"; ob_start(); $pdf->writeHTML($productItem, true, 0); $productCount++; }//Close and output PDF document $pdf->Output(); ?>
  24. Hi All I am trying to create page numbers at the bottom of my categories page. I have got it to work sort of but the last thing that I am trying is to only show a certain number of the pages. if I only want to show 15 pages and there are 15 pages or less then it shows all the pages, but if there is say 21 pages then it shows previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 . . . next, and when the user moves onto the second page it shows previous . . . 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 . . . next I have seen it done on some sights I am not sure how to do it, any help will be appreciated Here is my code Thanks Lional
  25. I have a product list with about 800 products. I want to pull the info from the database in categories which would end up at about 60 products. I want to put 6 products per page. I want this in pdf. I get to pull the products but I do not know how to create miltiple pages
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.