Answered Questions

  • POST and GET Methods

    Which will execute faster POST or GET? Explain

    Abinash Kumar

    • Jun 20th, 2017

    Both will execute faster its just that the difference in method. Post does not throws value or information in the address bar but get does.

    charujain

    • Sep 15th, 2015

    GET method can send only 1024 bytes of information and POST method have no limit.

  • PHP Session

    Where does the session stored, either client side or server side?

    PRASHANT PRAKASH WADIKAR

    • Mar 8th, 2018

    Session stored on server side

    sagar

    • Jan 6th, 2018

    Session stored on server side and cookies stored on client side.
    session start using session_start(); method and destroy using session_destroy(); method

  • difference between require() and include()

    The require() statement includes and evaluates the specific file. The include() statement includes and evaluates the specified file include() produces a Warning while require() results in a Fatal Error.

    ankita

    • Dec 15th, 2006

    The two constructs are identical in every way except how they handle failure.

  • what is differenc between mysql_connect and mysql_pconnect

    manas ranjan dikhit

    • May 31st, 2007

    Mysql_connect  establish a new connection every time when it connect to database but mysql_pconnect first searches if there is pre-existing connection or not. if it found connection then it make use of that connection to databases.

  • how i will check that user is, logged in or not. i want to make it a function and i want to use in each page and after login i want to go in current page(same page. where i was working)

    abc

    • Sep 12th, 2011

    For this we can use the session objec($_SESSION)t. When the user login with his/ her user name and password, usually we check those to ensure for correctness. If that user name and password are valid ...

  • how we know browser properties

    Star Read Best Answer

    Editorial / Best Answer

    bicu  

    • Member Since Sep-2005 | Mar 3rd, 2006


    get_browser() attempts to determine the capabilities of the user's browser. This is done by looking up the browser's information in the browscap.ini file.

    echo $_SERVER['HTTP_USER_AGENT'] . "<hr />\n";

    $browser = get_browser
    ();

    foreach (
    $browser as $name => $value
    ) {
        echo
    "<b>$name</b> $value <br />\n"
    ;
    }

    naveen gautam

    • Dec 24th, 2011

    $_SERVER[HTTP_USER_AGENT]; by this method we can know the properties of browser.

    abc

    • Sep 12th, 2011

    Code
    1. echo $_SERVER['HTTP_USER_AGENT'] . "
    2. ";

  • What is difference between require_once(), require(), include().Becouse above three function usely use to call a file in another file.

    Star Read Best Answer

    Editorial / Best Answer

    bicu  

    • Member Since Sep-2005 | Feb 4th, 2006


    Difference between require() and require_once():  require() includes and evaluates a specific file, while require_once() does that only if it has not been included before (on the same page).
    So, require_once() is recommended to use when you want to include a file where you have a lot of functions for example. This way you make sure you don't include the file more times and you will not get the "function re-declared" error.

    Difference between require() and include() is that require() produces a FATAL ERROR if the file you want to include is not found, while include() only produces a WARNING.

    There is also include_once() which is the same as include(), but the difference between them is the same as the difference between require() and require_once().

    aditya dhanraj

    • Apr 29th, 2015

    Require_once():-using this function we can access the data of another page once i. e we can not access the same page multiple times.

    require():-using this function we can access the data of another page at the desire page multiple times i.e we can access the contents of same page multiple times.

    LAILA NISHI

    • Feb 21st, 2015

    Include() and require() dose same work.The difference is on error cheeking .Require () gives a fatal error when file cant load whereas include() gives a warning and continue to execute.