Can anybody supply me with a script the does what is in the title above please?
I have tried so many different methods!
here is what im currently trying to get to work
SIGN IN -
<!doctype html public "-//w3c//dtd html 3.2//en">
-
-
<html>
-
-
<head>
-
-
-
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
-
-
<table border='0' width='50%' cellspacing='0' cellpadding='0' align=center><form name=form1 method=post action=signupck.php onsubmit='return validate(this)'><input type=hidden name=todo value=post>
-
-
<tr bgcolor='#f1f1f1'><td align=center colspan=2><font face='Verdana' size='2' ><b>Signup</b></td></tr>
-
<tr ><td > <font face='Verdana' size='2' >Username</td><td ><font face='Verdana' size='2'><input type=text name=username></td></tr>
-
-
<tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >Password</td><td ><font face='Verdana' size='2'><input type=text name=password></td></tr>
-
<tr ><td > <font face='Verdana' size='2' >Re-enter Password</td><td ><font face='Verdana' size='2'><input type=text name=password2></td></tr>
-
-
-
<tr bgcolor='#f1f1f1'><td ><font face='Verdana' size='2' > First Name</td><td ><input type=text name=f_name></td></tr>
-
<tr ><td > <font face='Verdana' size='2' >Sirname</td><td ><font face='Verdana' size='2'><input type=text name=l_name></td></tr>
-
-
<tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >Email</td><td ><font face='Verdana' size='2'> <input type=text name=email</td></tr>
-
-
<tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >Address 1</td><td ><font face='Verdana' size='2'> <input type=text name=address1</td></tr>
-
<tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >Address 2</td><td ><font face='Verdana' size='2'> <input type=text name=address2</td></tr>
-
<tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >County</td><td ><font face='Verdana' size='2'> <input type=text name=county</td></tr>
-
<tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >Post Code</td><td ><font face='Verdana' size='2'> <input type=text name=postcode</td></tr>
-
<tr bgcolor='#f1f1f1'><td > <font face='Verdana' size='2' >Telephone Number</td><td ><font face='Verdana' size='2'> <input type=text name=number</td></tr>
-
-
<tr ><td > <font face='Verdana' size='2' >I agree to terms and conditions</td><td ><font face='Verdana' size='2'><input type=checkbox name=agree value='yes'></td></tr>
-
-
<tr bgcolor='#f1f1f1'><td align=center colspan=2><input type=submit value=Signup></td></tr>
-
</table>
-
-
<center>
-
<br><br><font face='Verdana' size='2' ><a href='login.html'>Already a member ? Please Login</a></font></center>
-
-
-
<center>
-
<br><br><font face='Verdana' size='2' ><a href='#'>link</a></font></center>
-
-
</body>
-
-
</html>
-
-
AND THIS CHECKS THE ABOVE -
<?
-
include "connection.inc.php";// database connection details stored here
-
?>
-
<!doctype html public "-//w3c//dtd html 3.2//en">
-
-
<html>
-
-
<head>
-
<title>(Type a title for your page here)</title>
-
</head>
-
-
<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">
-
<?
-
if(isset($todo) and $todo=="post"){
-
-
$status = "OK";
-
$msg="";
-
-
// if userid is less than 3 char then status is not ok
-
if(!isset($username) or strlen($username) <3){$msg=$msg.'Username should be =3 or more than 3 char length<BR>';
-
$status= "NOTOK";}
-
-
-
-
if(mysql_num_rows(mysql_query("SELECT username FROM auth_users WHERE username = '$username'"))){
-
$msg=$msg.'Userid already exists. Please try another one<BR>';
-
$status= "NOTOK";}
-
-
-
-
if ( strlen($password) < 3 ){
-
$msg=$msg.'Password must be more than 3 char legth<BR>';
-
$status= "NOTOK";}
-
-
-
if ( $password <> $password2 ){
-
$msg=$msg.'Both passwords are not matching<BR>';
-
$status= "NOTOK";}
-
-
-
-
if ($agree<>"yes") {
-
$msg=$msg.'You must agree to terms and conditions<BR>';
-
$status= "NOTOK";}
-
-
-
-
if($status="NOTOK"){
-
echo "<font face='Verdana' size='2' color=red>$msg</font><br><input type='button' value='Retry' onClick='history.go(-1)'>";
-
}else{ // if all validations are passed.
-
$query=mysql_query("insert into auth_users(f_name,l_name,email,username,password,address1,address2,county,postcode,number) values('f_name','$l_name','$email','$username','$password','$address1','$address2','$county','$postcode','$number')");
-
echo "<font face='Verdana' size='2' color=green>Welcome, You have successfully signed up<br><br><a href=login.php>Click here to login</a><br></font>";
-
}
-
}
-
?>
-
<center>
-
<br><br><a href='#'>#</a></center>
-
-
</body>
-
-
</html>
-
2 2796 Atli 5,058
Expert 4TB
Hi.
We are happy to help you out if you run into any problems while writing your code, but we will not write it for you. Check out the Posting Guidelines for more info on this.
If you run into any problems while writing the code, post it here and we will do our best to help you out.
As to the code you posted.
What exactly is the code supposed to do?
Why (how) is it not working?
You can check out this article for an example of how to use Sessions to handle user logins.
Hi,
That is no problem at all, i wouldnt expect it to be done for me.
The first piece of code simply is for registering an account
the second piece of code checks everything is ok with what has been entered before submitting. When i run it, it just writes the code to the screen. No issues with first piece as it is posting fine
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Joshua Beall |
last post by:
Hi All,
What is the best way to use a cookie to remember a logged in user? Would
you store the username and password in two separate cookies? Should the
password be plain text? Hashed? Not...
|
by: Lou |
last post by:
Please can someone put me out my misery!
Im trying to find a multiple user/password protection script that will
redirect the specific user to a specific directory.
At the moment I have set up...
|
by: Trevor Andrew |
last post by:
Hi There,
Hopefully this isn't too difficult a question to express here. I have a 3
tier application.
1. Presentation Tier: ASP.NET web application. 2. Middle Tier: ASP.NET Web
Services that...
|
by: Siobhan |
last post by:
Hi
What is the recommended way to store a user's database credentials across
the pages of a web application so that each time the database is accessed the
system doesn't have to ask them for their...
|
by: Funky |
last post by:
Hi,
I have developed an ASP.NET application which has been running in
production for around 3 months without any major glitches. Recently, a
user was attempting to upload a rather large CSV file...
|
by: nasirmajor |
last post by:
dear all,
a simple quetion from still a bigginer in asp.net
i have a simple webpage with username and password which is linked with
database. now when user gives
his username and password and if...
|
by: webrod |
last post by:
Hi all,
how can I check a user/password in a LDAP ?
I don't want to connect with this user, I would like to connect to LDAP
with a ADMIN_LOG/ADMIN_PWD, then do a query to find the user and...
|
by: underground |
last post by:
Hi, everyone I've been trying to figure out a way for a user to update there information. I'm using sections to identify the specific user..Here is the form
<?
include("include/session.php");...
|
by: Hejman |
last post by:
ok i had some problems before with imaging, but that is all solved. but now i need help with some user authentication. basically, when you add a user to my database, "busted" under table "user_info",...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |