misheck Posted October 25, 2008 Share Posted October 25, 2008 I am studying PHP and I have an exercise whereby I have to I have to include on a page an option for users to select the fontsize, color and font choice. So I have created a css page option value> I need to know what statement ($_SESSION) I will have to add to my php page so that it can include the css selected value. I also need to allow users have an option to save these settings as a cookie so they can be remebered next time they login. I have put an include file on a test login file (<?php include "test.css";?>) Link to comment https://forums.phpfreaks.com/topic/130023-how-to-format-php-pages-using-css/ Share on other sites More sharing options...
johnsmith153 Posted October 25, 2008 Share Posted October 25, 2008 1. Use something like http://www.colourpicker.com/ and have the selected value posted to a PHP page where the value is saved in a session: $_SESSION['anyNameYouWant']=$_POST['ValuePosted']; 2. When you need to display, just: <span style="font-color:<?php echo $_SESSION['anyNameYouWant']; ?>">This Text Is In Your Selected Colour</span> This Is Not In Your Colour This should start you off. Link to comment https://forums.phpfreaks.com/topic/130023-how-to-format-php-pages-using-css/#findComment-674148 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.