I know what you mean but:
1. The teacher says its ok to work with friends and get their ideas, i'm just trying to get ideas, and we are allowed to search online, it's just I can't find the answers I'm looking for.
2: The password question is not a necessity in my assignment, it's just one of the ideas I have (for creativitiy) and I want to know how it could be done, so I can consider looking into it.
I really can't just "learn it myself" its too hard - I have no PHP experience and the class notes have basic "how to print using echo, using loops, arrays, etc" not specific techniques.
Btw I have no friends to ask for help, they all seem to have done PHP before and consider me inferior:( This is what I've tried doing so far,
mixing HTML with PHP:
<!DOCTYPE HTML>
<html lang=en>
<head>
<meta charset = "utf-8">
<title> Home </title>
<link rel="stylesheet" href="stylesheet.css"/>
<?php
if(isset($_POST['font_color'])) {
// variables
$header = $_POST['font_color'];
$purple = "purple";
$black = "black";
if(!empty($header) && $header == $purple) {
?>
<link rel="stylesheet" href="stylesheet2.css"/>
<?php
} else if(!empty($header) && $header == $black) {
?>
<link rel="stylesheet" href="stylesheet.css"/>
<?php
}
}
?>
</head>
The above is linked to this form:
<div id="form">
<form action="admin.php" method="post">
HEADER: <input name="header" type="text"/> <br/>
FOOTER: <input name="footer" type="text"/> <br/>
FONT TYPE: <input name="font_type" type="text"/> <br/>
FONT COLOR: <input name="font_color" type="text"/> <br/>
<input type="submit" value=" Submit "/>
</div>
So far it works it's just it doesn't link the style sheet forever, so if I change the font to purple or black it changes again when I refresh the page.. otherwise it works when I type "purple" in the font section of the form now etc.
Thanks,
Kranti