answersLogoWhite

0


Best Answer

You can set a cookie using the setcookie() function. You can do this as many times as you wish during your script. Remember that the cookie will not be available to PHP until the next time the page is loaded (or the script is called by a new HTTP request). On the next page, you can access the cookie data from the $_COOKIE super-global array. The key will be the name of the cookie, and the value will be the value you assigned to it the last time you set it.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you create a cookie and where will it placed in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you install crystal reports for php?

how to create report in php


How do you create an area of a webpage to display PHP results?

PHP code blocks start with <?php and end with ?>.


How do you create a PHP script?

To create a PHP script all you have to do is create a new file, then save the file as "filename.php". It must have a .php file extension.After that open the file and put in the PHP tags like shown.Then you write your PHP script within those tags and upload to your web space and check it out.


Why do we use Php?

PHP is an Open Source Scripting Language. We can create Web Pages and Web Applications using PHP.


How do you password protect a HTML webpage?

An HTML web page can not be password protected on its own. This is a task better suited for a language such as PHP when combined with HTML forms. You could ask the user for a password, and if it is correct create a cookie. When the user visits the site, you can redirect them elsewhere if they don't have the cookie.


What is php image size?

PHP can create images of different sizes. It depends on a particular image.


How do you create a text editor in PHP?

Well it got nothing to do with PHP, you going to need JavaScript to do that :)


How do you get a cookie on a certain page?

Its an easy PHP code


What is new in PHP?

PHP is a recursive acronym for "PHP: Hypertext Preprocessor" created by The PHP Group. PHP is a widely used server-side scripting language and the general purpose of PHP is to create dynamic Web Pages. For more information, visit the PHP website.


How do you create a web mail script using PHP?

You can use phpMailer() Or, you can use mail() PHP function to send emails via PHP script.


Is a cookie is a special HTML page?

No, a cookie is a temporary note that websites can place(not by HTML but with PHP) that tells the Web Browser to do something when that web page is called upon.


What is the way to create a function in PHP?

function function_name() { .................... }