Jump to content

login help


mikewash22

Recommended Posts

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>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.