mikewash22 Posted March 28, 2012 Share Posted March 28, 2012 how to submit registration to database....for it to follow through? also how to get the login to really go thorugh? please help <html> <?php session_start(); require_once 'database.php'; if (isset($_SESSION['user'])){ echo "Welcome ".$_SESSION['user']; ?> <?php } elseif(isset($_SESSION['admin'])){ echo"Welcome ".$_SESSION['admin']; echo"<br><br>You are logged in as an Admin"; ?> <?php }else{ ?> <?php } ?> <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"> <form id='login' action="login2.php" method='post' accept-charset='UTF-8'> <body> <body bgcolor="#E6E6FA"> <fieldset > <div align="right"/> <legend> Login </legend> <input type='hidden' name='submitted' id='submitted' value='1'/> <label for='username' >UserName*:</label> <input type='text' name='username' id='username' maxlength="50" /> <label for='password' >Password*:</label> <input type='password' name='password' id='password' maxlength="50" /> <input type='submit' name='Submit' value='Submit' /> <div align="right"/> </fieldset> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><H1><div align="center"/>WELCOME TO UNDERGROUND RECRUITS!</H1> <title>SIGN UP</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body, label,a { font-family : Arial, Helvetica, sans-serif; font-size : 12px; } .formcontainer { text-align:left; width:330px; border-top: 1px solid; border-bottom: 1px solid; padding:10px; margin: auto; } .para { margin-bottom: 10px; } </style> <link rel="STYLESHEET" type="text/css" href="pwdwidget.css" /> <script src="pwdwidget.js" type="text/javascript"></script> </head> <body > <div class='formcontainer'> <h1>Register</h1> <form method="post" action="database.php"> <div class='para'> <label for='name'>Name: </label><br /> <input type="text" id='name' name="name"/> </div> <div class='para'> <label for='email'>Email:</label><br /> <input type="text" id='email' name="email"/> </div> <div class='para'> <label for='username'>Username:</label><br /> <input type="text" id='username' name="username"/> </div> <div class='para'> <label for='regpwd'>Password:</label> <br /> <div class='pwdwidgetdiv' id='thepwddiv'></div> <input type="password" id='password' name="password"/> <script type="text/javascript" > var pwdwidget = new PasswordWidget('thepwddiv','regpwd'); pwdwidget.MakePWDWidget(); </script> <noscript> <div><input type='password' id='regpwd' name='regpwd' /></div> </noscript> </div> <div class='para'><br /><br /> <input type="submit" name='submit' value="submit" /> </div> </form> </div> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
eldan88 Posted March 28, 2012 Share Posted March 28, 2012 Hi, Did you create a table already in the database. If so you need to prep the values and then create an insert command through my SQL before you even create a submit form. Also how are you storing the passwords into the DB? Are the passwords going to be hashed and encrypted? If so I can show you an example of how I would of done it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.