logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • How to set cookies in PHP?


  • Correct Answer
  • The function setcookie() is used to define a cookie that is to be sent along with HTTP headers The cookie must be sent prior to any output from the script as is the protocol restriction After setting the cookies, they can be used when the next page is loaded by using $_COOKIE or $HTTP_COOKIE_VARS arrays 


  • Technology problems


    Search Results


    • 1. Explain when to use GET or POST. Provide example for both the ways.
    • Discuss
    • 2. What type of inheritance that PHP supports? Provide an example.
    • Discuss
    • 3. Explain how to create random passwords.
    • Discuss
    • 4. Explain how to store the uploaded file to the final location.
    • Discuss
    • 5. Explain how to send large amounts of emails with php.
    • Discuss
    • 6. What Is a Session in PHP?
    • Discuss
    • 7. How can we encrypt the username and password using PHP?
    • Discuss
    • 8. Explain the changing file permission and ownership using PHP's chmod() function.
    • Discuss
    • 9. Explain the working with directories using opendir(), readdirs(), closedir() along with examples.
    • Discuss
    • 10. What is the difference between using copy() and move() function in php file uploading?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment