User Profile

Collapse

Profile Sidebar

Collapse
ssharifi
ssharifi
Last Activity: Jun 22 '10, 04:08 AM
Joined: Apr 8 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ssharifi
    replied to echoing the content of a document
    in PHP
    hi,thanks for the advice,i meant for example when i give the site i have written to the admin of site he wants to fill it as he like without using the editors like dreamweaver,bec ause it is educational site for most of the pages they have a predefined apearance.but for example for the first page maybe once the admin wants to add a description and a picture,and after sometme he wants to change the appearance and content and put 3 pictures,theref ore...
    See more | Go to post

    Leave a comment:


  • ssharifi
    started a topic echoing the content of a document
    in PHP

    echoing the content of a document

    hi

    i want to echo the content of a pdf or word document(which is in my db) in the web page.but i dont want it to be displayed as pdf format,as it is in this code
    Code:
    <?php
    require_once('config/database.php');
    $rscRS = mysql_query("SELECT * from upload WHERE id=" .  $_GET['id']) or die(mysql_error($rscDb));
    $arrRow = mysql_fetch_assoc($rscRS);
    header('Content-Type:  application/pdf');
    ...
    See more | Go to post

  • ssharifi
    replied to unable to upload files larger than 1MB
    in PHP
    hi,i chcked,the error is :MySQL server has gone away
    i searched about it,some has sayed that changing the global max_allowed_pac ket might solve the problem,but i didnt find this parameter in php.ini or elsewhere,what should i do then plz?
    and i have my second question that consdering these problems and also database becoming so heavy,which method is better for uploading in a page that about 100 pdf articles are uploaded in a year(each...
    See more | Go to post

    Leave a comment:


  • ssharifi
    started a topic unable to upload files larger than 1MB
    in PHP

    unable to upload files larger than 1MB

    Hi,I have problem in uploading files larger than 1MB!!

    I changed the php.ini setting to this:
    memory_limit = 32M ---> 320M
    post_max_size = 16M-->160M
    upload_max_file size = 32M--> 320M
    with the initial setting i could upload files smaller than 1M and for larger till 6M it echoed query error(means it was unable to insert the file into database) and for larger than 6M it echoed fatal error:
    ...
    See more | Go to post

  • I replaced the inner code with
    Code:
    $timestamp=$rowpublic["date"];
    $t=strtotime($timestamp);
    $newdate=date('F Y',$t);
    echo ($rowpublic["publisher"]). ',' . ($t);
    and it is correct now
    See more | Go to post

    Leave a comment:


  • hi,thanks for the help,It would print NULL, I also put print for $date but it would print the correct time. I moved the code before sql query and also replaced NULL with 00 for inserting day.it is now ok. only one small problem is left that because i want to ignore day i will do as follows:

    Code:
    $respublic= mysql_query("SELECT * FROM publication");
    while($rowpublic=mysql_fetch_assoc($respublic))
    {
         $timestamp=$rowpublic["date"];
    ...
    See more | Go to post

    Leave a comment:


  • I changed the code but i it still displays 0000-00-00 .i also checked var dump_sql and understood that NULL is entering into db
    See more | Go to post

    Leave a comment:


  • yes,the first and second snippet are in one file(publicatio n.php)
    See more | Go to post

    Leave a comment:


  • ssharifi
    started a topic problem in saving date in database and displaying
    in PHP

    problem in saving date in database and displaying

    I want to use 2 jumpmenu to let users select publishing date of their document(which only year is necessary to be filled ) and then I will save it in a correct format into db and display what the user filled such as: April 2010,2010,...
    here is my code but it doesn't get the date and in my database it is saved 0000-00-00:
    FORM:
    Code:
    <form action="publication.php"  method="post" enctype="multipart/form-data">
    ...
    See more | Go to post

  • hi,thanks for the help.
    my problem is solved now
    See more | Go to post

    Leave a comment:


  • ssharifi
    started a topic Displaying the data from DB in the textfiles
    in PHP

    Displaying the data from DB in the textfiles

    Hi,
    I have an editing form for my users in which they can change their profiles and the change is saved in database and also displayed for the user.the problem is that testfield that have varchar type only display the first word of what user typed.for example if a user wants to change his last name from 'salehi' to 'salehie rashid' the complete new lastname will be updated in database but in the textfield only the first word(before space)...
    See more | Go to post
    Last edited by Atli; Apr 8 '10, 07:21 PM. Reason: Added [code] tags.
No activity results to display
Show More
Working...