Write a PHP script to change the preferencesofyourwebpagelikefontstyle,fontsize,font color, Backgroundcolorusingcookie.Displayselectedsettingonnextwebpageandactual implementation (withnewsettings)onthirdpage(UseCookies).
Fristpage.html
<!DOCTYPEhtml> <html> <head> <title>Changepreferences</title> </head> <body> <h1>Changepreferences</h1> <formaction=”secondpage.php”method=”post”> <labelfor=”fontstyle”>FontStyle:</label> <selectname=”fontstyle”id=”fontstyle”> <optionvalue=”Arial”>Arial</option> <optionvalue=”TimesNewRoman”>TimesNewRoman</option> <optionvalue=”Verdana”>Verdana</option> </select><br><br> <labelfor=”fontsize”>FontSize:</label><selectname=”fontsize”id=”fontsize”>
<optionvalue=”12”>12</option>
<optionvalue=”14”>14</option>
<optionvalue=”16”>16</option>
</select><br><br>
<labelfor=”fontcolor”>FontColor:</label>
<inputtype=”color”name=”fontcolor”id=”fontcolor”><br><br>
<labelfor=”bgcolor”>BackgroundColor:</label>
<inputtype=”color”name=”bgcolor”id=”bgcolor”><br><br>
<inputtype=”submit”name=”submit”value=”Save”>
Header(‘Location:thirdpage.php’);
Exit();
}
?>
Thirdpage.php