Question
What is the best way to combine these two files and to make sure they work the way the should? I have created an html
What is the best way to combine these two files and to make sure they work the way the should? I have created an html page and a php page? I am suppose to create a page that will request the following information from a user and will use this information to set cookies that expire in a week: users name, users age, and users gender. Save your page with the file name cookiesOne.php.
HTML File
Gathering Data for the Cookies
This page was created to gather information from the user to set the cookies on the user's computer.
Tell us a little bit about yourself:
What's your name?
How old are you?
What's your gender (male/female/other/prefer not to say)?
PHP File
define("NEW_TIME", 60"60"24"7); $username = $_POST{'name'}; $userage = $_POST{'age'}; $usergender = $_POST{'gender'}; $setcookie("name", $username, time() + NEW_TIME); $setcookie("age", $userage, time() + NEW_TIME); setcookie("gender", time() + NEW_TIME); ?>
Setting the Cookies
We set up a ccokie on your hard drive!
It contains:
Who you are:
The age you say you are (really?):
Your gender:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started