Forum Moderators: not2easy

Message Too Old, No Replies

New to CSS

         

Carlo Gambino

4:01 pm on Jul 30, 2008 (gmt 0)

10+ Year Member



I have been experimenting with using a form to allow users to chose formatting preferences upon entering a site. I've read it's possible to somehow have these variables stored for use in an external css file- Is this true?

How can I accomplish this? Can someone point me in the direction of reading on this topic?

Here is my code:

</php
session_unset();

?>
<html>
<head>
<title>Please Log In</title>
</head>

<body>
<?php include "header.php" ?>
<form method="post" action="http://www.mysite.com/movie1.php">
<p>Enter your username:
<input type="text" name="user">
</p>
<p>Enter your password:
<input type="password" name="pass">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p>
</form>

<p> Enter your font choice:
<select name="font">
<option value="Verdana">Verdana</option>
<option value="Arial">Arial</option>
<option value="Times New Roman">Times New Roman</option>
</select>
</p>
<p>Enter your font size:
<select name="size">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</p>
<select name="menu">
<option value="black">Black</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="purple">Purple</option>
</select>
</p>
<?php include "footer.php" ?>
</body>
</html>

webfoo

2:46 am on Aug 1, 2008 (gmt 0)

10+ Year Member



No, You shouldn't store data in a CSS file. I would create a DataBase of user prefs, then have a PHP script generate a custom stylsesheet based on the DB.

webfoo

2:47 am on Aug 1, 2008 (gmt 0)

10+ Year Member



Also on the first line of your php, change </php to <?php

That should help.