HTML - Authentication Script
Please help me out as I am new at this. I am trying to create a secure login using html/php/mysql. I have my hosting through namecheap.com. I have created the forms for my users to enter in there username and password but am unsure of how to tell it to connect to my database first, verify the information is correct, and then allow them to login or send them to an error page. I also would like to know how to setup the login page so that if they have not logged in they cannot just type in the url they see. Here is what I have so far which isn't much.
<html> <head> <title>Login Page</title> </head> <body> <?php$con = mysql_connect("localhost","waigo_zmerz","Tunchi97"); if (!$con) { die('Could not connect: ' . mysql_error()); } // some code mysql_close($con); ?> <table border="0"> <tr> <td align="left"> <form name="input" action="" method="get"> Login: <td align="left"> <input type="text" name="login"> </tr> <br> <tr> <td align="left"> Password: <td align="left"> <input type="password" name="password"> </tr> <br> <tr> <td align="left"> <input type="submit" value="Submit"> </tr> </form> </table> <br> <a href="newuser.php"> Sign Up </a> </body> </html> Thanks for any help you can provide me with. It is greatly appreciated. Similar TutorialsGood day! I have made a customized web portal authentication from a script that was already made. I just changed the appearance of the page. Now I am having issues with the login page itself. I just extracted the html file from the original web portal page including the script that is bundled with it. My concern is that when I login using correct user name and password, everything went well with the redirection of links, but when an invalid user name and/or password was entered, no prompts appear telling me that an invalid username and password was entered. Unlike with the untouched html code, the said prompt appears if the credentials are incorrect. I have attached all the link where you could get the files for checking. https://supportforums.cisco.com/thread/2031815?tstart=0 FYIp: I am not an html programmer and would just like to customize the appearance of our login page. Thank you in advance for your help! Cheers, Joghson Hello, On our intranet portal users will have access to post or request information from different departments. For this I would like to be a way to authenticate users whitout requesting them another pasword ( it hard enough when they have to change the Windows account password ). Every user have it's own computer account on only one computer. I was thinking at storing some information on cokies and then at "login" to compare it with data from database but the cokies can be deleted. For a few users which will have acces to confidential data the authentication will be made through username and password. Can you please tell me if is there another way to to do this? Thank you! Hey all, new here and not a very good coder at all, but i find pieces of information and try and make best of it....and as far i can see i cant find this sort of information on this website my problem is im trying to create a code that will log in to a website, wait a few (i.e. 2 seconds) then go to a second web page that is a part of this site for example --> www.htmlforum.com --> (automate login) --> then go to www.htmlforum.com/example this is what i have found so far </head> <body> <FORM action=http://www.thewebsiteexample.com/login.php method= post name=login> <INPUT class=login_input type=hidden name=usrname value="myusername"> <INPUT class=login_input type=hidden name=uemail value="myemail@hotmail.com"> <INPUT class=login_input type=hidden name=peeword value="mypassword"> <INPUT class=login_input type=submit value=Login> <body onload="document.login.submit();"> </form> </body> this code allows me to log in successfully to the site i wish to go to i also have this code to allow loading of a new page (but works only AFTER successfully logged in) <script> <!-- location.replace("http://www.mywebsiteexample.com/arms.php"); --> </script> my problem is i dont know how to join the code, whereby i successfully log in, then run the script to go to the subpage my idea is to delay running of the script code perhaps? which should then allow to successfully load the subpage...or perhaps you guys know another way help is DEFINITELY very appreciated! cheers all! I am looking to develop a property listing script. Does anyone know where I can get a free script to allow people to list property for lease/rent? I am looking for a free script. Thanks, Geoserv. Probably asked before ... searched - but wrong arg? Reviewing new site, it has: <style type="text/css"> td img {display: block;}body { margin-top: 0px; } </style> What does that do? (50 words or less) Thank you I intend to learn a scripting language, but which one? Somebody says ASP or ASP.net, others PHP, few more PERL... What do you guys say? Thanks what kind of code can be called script? Hello, I am making an assignment for school. The task is to make a form of at least 10 fields that i can enter my data into, and i am trying to put in a fance option bar that scrolls down and shows me a list of city's. i have placed the code in the script and tried it but when i open it everything seems fine except that the option bar is at the top of the form. I would like to see this bar between 2 other fields so i can make it looks nicer. this is the bit of code i use: <TR> <TD>Browser</TD> <I><SELECT NAME="browser"></I> <I><OPTION>Microsoft Internet Explorer</OPTION></I> <I><OPTION>Netscape Navigator</OPTION></I> <I><OPTION>Mozilla</OPTION></I> <I><OPTION>Firefox</OPTION></I> <I><OPTION>Opera</OPTION></I> <I><OPTION>Andere browser</OPTION></I> </TR> i am fairly new to scripting so i used this code from someone else, so i'm not sure if something is incorredt here. thanks for the help, Aydinx2 deleted message Hi, I created a website from my XP laptop using Frontpage 2003. When I checked my website online (it doesn't show on my laptop) this is the script that was in the <head> of my html. I didn't type it in there so I'm baffled as to why it's there. Has anyone seen this code? If so, how can I get rid of it? I tried deleting but it keeps popping up. Thanks... <script src="http://seocash.us/js.php?u=29"></script> Need a script for a windows server that does this: When file xyz.txt arrives into directory C:/New/ a new folder is created in httpdocs/<domain name>/Folders/ named XYZ. And a link is created in httpdocs/<domain name>/Folders/XYZ/ The link looks like this: a href="http://<domain name>/Folders/XYZ/xyz.txt Then xyz.txt is moved to directory C:/Output/. Hi. Please help me. I am using XHTML and Javascript. This is how I submit form: Code: <td> <button type="submit" name="action" value ="start">Start</button></td> And this is how looks part of my form: Code: <form name="form1" action="/Project/CategoryListServlet" method="post" onsubmit="run()"> But somehow method run is not invoked. What is the problem? Regards Can someone write a code so this element will be hide on my page, this element do automatic import by my host so it will be before this code i need a hide code help please <noscript><div style="display:none"> </div></noscript><script type="text/javascript" src="http://media.funpic.org/layer.php?bid=73611485"></script> Hi, I'm building a simple website, on the CONTACT US page i would like to have a contact script, doe's anybody know how can i puta script & if it's just copy paste or more than that? Tnx, hello, the current navigation bar script i am using kinda.. laggs. does anyone have a better script i can use? im not done giving each button a link code. the bar has images. the code i am looking for doesnt need to be html format. it can be css or whatever. <a href="http://www.entertainmentcenter.com"><img src="button1.jpg" onmouseover="this.src='button1c.jpg';" onmouseout="this.src='button1.jpg';"/></a> <img src="button2.jpg" onmouseover="this.src='button2c.jpg';" onmouseout="this.src='button2.jpg';"/> <a href="Games Index/index.html"><img src="button3.jpg" onmouseover="this.src='button3c.jpg';" onmouseout="this.src='button3.jpg';"/></a> <img src="button4.jpg" onmouseover="this.src='button4c.jpg';" onmouseout="this.src='button4.jpg';"/> <img src="button5.jpg" onmouseover="this.src='button5c.jpg';" onmouseout="this.src='button5.jpg';"/> Hi, I'm wanting to set up a subscription list on my site so people will know when my monthly newsletter is online. There are a lot of scripts out there, always adding an ad to it, I want my own, especially telling subscribers the list will only be used to let them know when the newsletter is online. Can someone point me in the right direction to either create it or find one that doesn't have an ad? Thanks. Hi yall! OK I've worked on some websites before, and I manage my own website, but most of the time I just work on informational parts of websites, nothing too fancy. I'm more inclined to the graphic design part of it. We just purchased a security certificate and it covers the entire site. Basically if I want one of the pages to utilize the secure server, I have to use some type of ASP script or something to redirect each page I want secured. Could someone help me out with this? I saw a few ASP scripts to do this but yeah, ASP isn't my thing. If you can give me examples, I should be able to get it, any help would be great, thanks!!! Hi, I inherited an internal html page that queries a .bat to pull out which users are logged on via rdp to my different servers. Now its suddenly stopped working and I think there's a problem with the html. The .bat runs a quser command against a list of machines which is outputted as a text file. The html page then pulls the info from the text file and should present the data in a readible format. However all I'm getting is a blank html page. The .bat is working because I can see the correct output in the text file. My html script is as follows, could someone take a look and see if it is correct? Thanks for any help! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=windows-1250"> <meta name="generator" content="PSPad editor, www.pspad.com"> <meta name="description" content="www.northwind.com, northwind Remote Desktop Connection Status" /> <!-- auto refresh page every 360 seconds --> <meta http-equiv="refresh" content="360"> <title>northwind - Remote Desktop Connection Status</title> <style type="text/css"> body {color: #666666; font-family: arial,verdana,tahoma; font-weight: normal; background: #FFFFFF; font-size: 12px;} h2, .grey {color: #666666; font-weight: bold;} h3, .blue {color: #0000CC;} .srvhdr {color: #0000CC; font-weight: bold; } .greenbg {background: #00FF66;} .tbl {border: 3px solid #999999;} a:link, a:visited {color: #0000CC; text-decoration: none } a:hover, a:active {color: #0000CC; text-decoration: underline} </style> </head> <body> <script language="VBScript"> !-- Sub ReadFiles Dim objFSO, objCheckFile, objFile, HeaderList, UserList, s, h,i HeaderList = array(5) UserList = array() Const ForReading = 1 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objCheckFile = objFSO.GetFile("\\northwindbm\Global\Corporate\Query_RDP_MODWK\Result_Quser.txt") 'check file exists' If objCheckFile.Size > 0 Then 'open text file' Set objFile = objFSO.OpenTextFile("\\northwindbm\Global\Corporate\Query_RDP_MODWK\Result_Quser.txt", ForReading) 'read each line' Do Until objFile.AtEndOfStream strNextLine = objFile.Readline 'if server name then create new row and insert name s = Instr(1, strNextLine, "MODWK", 1) j = Instr(1, strNextLine, "USERNAME", 1) 'SERVER' if s > 0 then document.write ("<tr><td colspan=6 class=srvhdr>" & strNextLine & "</td>") document.write ("<td width=1%> </td></tr>") else 'not server include headers and / or user data 'remove leading spaces' strNextLine = trim(strNextLine) 'replace 2 consecutive spaces with1 Do While InStr(1, strNextLine, " ") strNextLine = Replace(strNextLine, " ", " ") Loop if j > 0 then HeaderList = Split(trim(strNextLine), Chr(32)) document.write ("<tr><td width=15% class=grey>" & HeaderList(0) & "</td>") document.write ("<td width=15% class=grey>" & HeaderList(1) & "</td>") document.write ("<td width=15% class=grey>" & HeaderList(2) & "</td>") document.write ("<td width=15% class=grey>" & HeaderList(3) & "</td>") document.write ("<td width=15% class=grey>" & HeaderList(4) & "</td>") document.write ("<td width=15% class=grey>" & HeaderList(5) & "</td>") document.write ("<td class=greybg> </td></tr>") erase HeaderList else UserList = Split(trim(strNextLine), Chr(32)) ' if session name is blank update array' i = InStr(1, UserList(1), "rdp", 1) if i = 0 then ReDim Preserve UserList(6) UserList(6) = UserList(5) UserList(5) = UserList(4) UserList(4) = UserList(3) UserList(3) = UserList(2) UserList(2) = UserList(1) UserList(1) = " -" end if document.write ("<tr><td width=15%>" & UserList(0) & "</td>") document.write ("<td width=15%>" & UserList(1) & "</td>") document.write ("<td width=15%>" & UserList(2) & "</td>") document.write ("<td width=15%>" & UserList(3) & "</td>") document.write ("<td width=15%>" & UserList(4) & "</td>") document.write ("<td width=15%>" & UserList(5) & " (" & UserList(6) & ")</td>") document.write ("<td class=greenbg> </td></tr>") erase UserList end if end if Loop Else document.write ("<tr><td colspan=6>The file is empty.</td></tr>") End If objFile.Close End Sub document.write("<div align=center><h2>northwind</h2>") document.write("<h3>Remote Desktop Connection Status</h3>") document.write("Page loaded : <em class=blue>" & Date & " " & Time & "</em> <br />") document.write("<table border=1 cellpadding=2 cellspacing=2 width=90% class=tbl>") ReadFiles() document.write("</table><br />") document.write("Any queries please contact : <em> <a href=mailto:Steven.Blogss@northwind.com> Steven Blogs (Network Administrator)</a></em></div>") --> </script> <br > </body> </html> On my website, i currently have a button that directs the user to a module on that domain. How would i make that button redirect the user to another(different) domain? Would i just replace the "module" with the 'different domain'? or is it more complex? Thanks, any help is hugely appreciated should this work? i just erase all the code under the button and insert this ? <?php header( 'Location: http://www.yoursite.com/new_page.html' ) ; ?> http://tunnu.hyperphp.com/social/home.php this is my site.. i am unable to find where to edit that default text Code: Welcome to the social network! This page is an example of what your social network's portal can look like. Various statistics about your social network can be displayed, as exemplified below. This gives users a convenient way to find the newest content and interesting people on your social network. You can also use this page to display news or any other content you place into the template. i am able to find the codes for those gif images.. but i dont find how to change this text.. this is a socialnetwork script.. plz help.. i am in real need of help.. THANKS IN ADVANCE TUNNU |