Jump to content

s.prema@yahoo.com

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

s.prema@yahoo.com's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello, Anybody there to help!!! I used the code to zip the excel file. It is zipped but got 'file corrupted' message opening the excel after extraction :'( <?php function uncompress($srcName, $dstName) { $string = implode("", gzfile($srcName)); $fp = fopen($dstName, "w"); fwrite($fp, $string, strlen($string)); fclose($fp); } function compress($srcName, $dstName) { $fp = fopen($srcName, "r"); $data = fread ($fp, filesize($srcName)); fclose($fp); $zp = gzopen($dstName, "w9"); gzwrite($zp, $data); gzclose($zp); } compress("a.xls","a.zip"); uncompress("a.zip","a1.xls"); ?> Help me! Or any library files are to be included?? Thanks. -Prema
  2. Hello, I need to export mysql tables from php into xls All r working fine. But the field with the datatype 'date' is not exported properly. In xls cell it is displayed as ######## What went wrong?? Thanks in advance.
  3. Hello, Here is my snippet, <script> function valid(name) { var t="<?php $_SESSION['FName']='<script>name</script>'; ?>"; } </script> <input name="chk" type="button" value="Submit" onclick="valid('Joe');" /> I need to store the variable 'name' in the php session variable 'FName'. Code is not exact or logical. But it could be similar. Struggling more. Need Help!!! Thanks.
  4. Hello... I need to convert a jpeg image [image is a bar chart, generated thru php ] into a pdf file and send as an attachment in mails. Can php experts help to achieve this ?? Thank you.
  5. Hello... document.getElementById('txtname').focus(); focus() is not working! Any solution ?????????????
  6. Sorry a correction in my text.... For question 1 : Q1 holds Question id, radio button array holds the 3 options named OPT1[] For question 2 : Q2, OPT2[] For question 3 : Q3, OPT3[] and so on..
  7. Hello everyone, I need to create a quiz module with db integration. User should select one of the three options each carry different points. Questions, options, points are stored in respective tables. Question count is dynamic and should be displayed with pagination [as link, to the same page quiz.php using mysql limit query], 5 questions per page. Now I am having up to 4 pages. And user can submit the quiz only in last page not before. Till this all done. Problem is, how to carry they selected answers over pages....???????? Please note, question id is dynamic and concatenated with the letter 'Q', and stored as hidden value, option id is also dynamic and concatenated with the word 'OPT', radio button array is used for every question. So, for every question, Q1 stores Question id, OPT[] holds the 3 options How to submit all these selected answers in the 4th page. Is it possible thru javascript.. or in PHP itself? :'( Very Urgent Thank U
  8. Hello... I need to create two image base to display two independent bar charts in a single page. One I could, how to create another in same page like..... $img_width=800; $img_height=200; $img=imagecreatetruecolor($img_width,$img_height); this image is created on top left of the screen.. using $img i created a bar like, using imagefilledrectangle() on it now I need to create another image beneath the first one. Help Me!
  9. Helllllllllo.............................. No one is there to answer?????????????
  10. Hello My php page has, <input type="radio" name="group1" value="Milk"> Milk<br> <input type="radio" name="group1" value="Butter" checked> Butter<br> <input type="radio" name="group1" value="Cheese"> Cheese <hr> <input type="radio" name="group2" value="Water"> Water<br> <input type="radio" name="group2" value="Beer"> Beer<br> <input type="radio" name="group2" value="Wine" checked> Wine<br> The groups and the values are dynamic. While submitting the page, how can I get the total number of groups in the page ?? How to get the group count in print_r() ??? Thanks.
  11. I need to develop a graphical / chart representation of a survey. User will input the answer for a set of questionnaire. Each question has 3 options, option A holds 5 points, B holds 2 points, whereas option C holds 0. After completing the questionnaire, according to options selected by user, pie chart or bar chart should be generated. Anybody did this before.. how to achieve this..?
  12. No I m not working on remote host 222.222.222.222, working with my source server 233.223.33.33 now tell wat to do
  13. Hello Actually I tried the following to export db and store the sql file in my source server, mysqldump -u admin -p instglive > /home/admin/public_html/test/storage/s.sql this is working fine. But now I need to import this sql file onto a remote server from my source server, what will be the command to work on putty???? In this following command where to mention the remote IP or remote path, mysql -h 222.22.22.22 -u dev -p instglive < /home/dev/public_html/test/instglive Its urgent. Thank u
  14. Hello I need to transfer a file from my ftp server to remote ftp server. Here is my code, but it gives error as, Warning: ftp_put() [function.ftp-put]: Can't open that file: No such file or directory <?php ob_start(); if(!file_exists('storage/glive.sql')) echo "File not found"; //ftp details of sedtination server $ftp_server="222.22.22.222"; $ftp_user="ferghco"; $ftp_password="*********"; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user, $ftp_password); if((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user"; exit(); } $upload = ftp_put($conn_id,'/test/glive1.sql', 'storage/glive.sql', FTP_BINARY); if (!$upload) { echo 'FTP upload failed!'; } ob_end_flush(); ?> Can anybody give the solution??????
×
×
  • 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.