Download presentation
Presentation is loading. Please wait.
Published byRuth Grant Modified over 9 years ago
1
To Proudly supported by ferrycake.com
2
We will be printing Cash for your Community tokens every week in the Carmarthen Journal and Llanelli Star. The more tokens you cut out and collect, the greater the share of our £10,000 prize pot your group will receive. So once you've received your registration, get out there and spread the word! Ask your friends, family, work colleagues and anyone from your local community to collect tokens on your behalf.
3
HTML The body of the website. Header paragraph Bold Line break List Ordered list Unordered list My Website About Me I live on Mars and like snickers
4
CSS This adds some colour and styling to our website. We can align the text, change the font, add a background picture and lots more. When we use in the page ( in-line ) we must inside css and this sits the tag css code My Website About Me I live on Mars and like snickers
5
p {color:red;text-align:center;} h1, h2, p { text-align: center; color: red; } body { background-color: #b0c4de; }
6
h1 { background-color: #6495ed; } p { background-color: #e0ffff; } body { background- image: url("paper.gif"); } h1 { text-align: center; } /* unvisited link */ a:link { color: #FF0000; } /* visited link */ a:visited { color: #00FF00; } /* mouse over link */ a:hover { color: #FF00FF; } /* selected link */ a:active { color: #0000FF; }
8
Index.htmllogin.php main.php
9
We use a FORM We have 2 text boxes username and password. We use a post method to send the contents of theses boxes to login.php Index.htmlLogin.php Username Password
10
Login.php Uses POST to get the post Changes the post into PHP variables. $username $password Runs an if Statement to see if the username and password match If they do match they have a link to main.php If they don not they get a link to index.htm
13
$accessTime = date('h:i:s');We use PHP built in date function to get the current time. $allowed = fopen("allowed.txt", "a");We use fopen to open a text file called allowed.txt $allowedTxt = " User ". $username. " accessed the system at ". $accessTime."\n"; Creates a line of text User julian accessed the system at ( current time ) \n “ creates a new line “ fwrite ($allowed, $allowedTxt."\n"); Writes the line of text to the open file
14
So if the username and password are correct we get echo " Correct username and password, This has been reported to admin " ; echo " Please click here to enter the site "; Another way of POSTing data ( not secure )
15
Login.php main.php main.php?username=$username <?php $name = ($_GET['username']); echo " Welcome ". $name. " "; ?> Because of the way we sent the post ( think of it as not having an envelope ) We use the GET method instead.
16
Could you guess the password if you did not have the code. Is it secure to have the password in plain text on the login screen. How could we improve it ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.