I am developing a site with HTML and CSS. I wish to possess a dummy sign in for with minimal functionality integrated at a corner of a webpage, whenever a password is utilize it should say "wrong password"!
I'd change it having a real log-in later. Right now i'm just making the website like a evidence of concept and don't wish to enter into an excessive amount of complexity like me not really a programer and know only HTML and CSS.
It may be a very simple factor to complete however i haven't been capable of finding any appropriate solutions from internet in last couple of several weeks. :(
Could anybody help ?
Well, jtbandes virtually stated it already: an engaged language needs to determine the validity from the login and, certainly with login particulars, because of security reasons, you need to use server-side code, like PHP or ASP.
With that said, it appears pointless to create a dummy login, apart from just building the Html page. Unless of course you utilize AJAX to transmit the information for your web-server, instead of sending the consumer to some processing page, every code you devote for any 'dummy' is a total waste of time and will have to be removed later.
The way the page look different after login because it does before and what's going to cause this difference? One more Enter the URL?
You will require a server-side language to handle qualifications. When you can operate a simple validation with HTML5 around the email (or username) area, you will require a server-side language for example PHP to be able to handle individuals qualifications. You could also wish to secure the passwords to create your login system safer, using something similar to
<div id="primary" role="primary"> <form method="publish" action="#" > <fieldset> <label for="username">Username <span class="ico"><img src="img/user.png" alt="Username Icon" border="" /></span></label> <input type="text" title="username" id="username" needed autofocus> <label for="password">Password <span class="ico"><img src="img/pass.png" alt="Password Icon" border="" /></span></label> <input type="password" title="password" id="password" needed> </fieldset> <fieldset> <span class="password"><a href="#">Forgot Password</a></span> <button type=submit>>>&nbsp&nbsp&nbspGO</button> </fieldset> </form> </div>
SQL People Table
CREATE TABLE `members` ( `id` int(4) NOT NULL auto_increment, `username` varchar(65) NOT NULL default '', `password` varchar(65) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=2 -- -- Dumping data for table `members` -- Place INTO `members` VALUES (1, 'john', '1234')
PHP Login Check
<?php $host="localhost" // Host title $username="" // Mysql username $password="" // Mysql password $db_title="test" // Database title $tbl_title="people" // Table title // Connect with server and choose databse. mysql_connect("$host", "$username", "$password")or die("cannot connect") mysql_choose_db("$db_title")or die("cannot choose DB") // password sent from form $myusername=$_Publish['myusername'] $mypassword=$_Publish['mypassword'] // To safeguard MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername) $mypassword = stripslashes($mypassword) $myusername = mysql_real_escape_string($myusername) $mypassword = mysql_real_escape_string($mypassword) $sql="Choose * FROM $tbl_title WHERE username='$myusername' and password='$mypassword'" $result=mysql_query($sql) // Mysql_num_row is counting table row $count=mysql_num_rows($result) // If result matched up $myusername and $mypassword, table row should be 1 row if($count==1) else ?>
PHP Login Effective
<? session_start() if(!session_is_registered(myusername))primary_login.php") ?> <html> <body> Login Effective </body> </html>
<? session_start() session_destroy() ?>