FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
T2-Web-Programming/signup.php at main · MilkyWay2k/T2-Web-Programming · GitHub
MilkyWay2k
/
T2-Web-Programming
Public
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
T2-Web-Programming
/
signup.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
45 lines (40 loc) · 1.27 KB
Breadcrumbs
T2-Web-Programming
/
signup.php
Copy path
File metadata and controls
45 lines (40 loc) · 1.27 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
if
(
isset
(
$
_POST
[
"
submit
"
])) {
$
f_name
=
$
_POST
[
"
f_name
"
];
$
l_name
=
$
_POST
[
"
l_name
"
];
$
username
=
$
_POST
[
"
uid
"
];
$
email
=
$
_POST
[
"
email
"
];
$
pwd
=
$
_POST
[
"
pwd
"
];
$
pwdconfirm
=
$
_POST
[
"
pwdconfirm
"
];
require_once
'
connect.php
'
;
require_once
'
functions.php
'
;
if
(
emptyInputSignup
(
$
f_name
,
$
l_name
,
$
username
,
$
email
,
$
pwd
,
$
pwdconfirm
) !==
false
) {
header
(
"
location: /registration.php?error=emptyinput
"
);
exit
();
}
if
(
invalidUid
(
$
username
) !==
false
) {
header
(
"
location: /registration.php?error=invaliduid
"
);
exit
();
}
if
(
invalidEmail
(
$
email
) !==
false
) {
header
(
"
location: /registration.php?error=invalidemail
"
);
exit
();
}
if
(
pwdMatch
(
$
pwd
,
$
pwdconfirm
) !==
false
) {
header
(
"
location: /registration.php?error=passwordsdontmatch
"
);
exit
();
}
if
(
uidExists
(
$
conn
,
$
username
,
$
email
) !==
false
) {
header
(
"
location: /registration.php?error=usernametaken
"
);
exit
();
}
if
(
strlen
(
$
pwd
) <
8
||
strlen
(
$
pwd
) >
20
) {
header
(
"
location: /registration.php?error=invalidpasswordlength
"
);
exit
();
}
createUser
(
$
conn
,
$
f_name
,
$
l_name
,
$
username
,
$
email
,
$
pwd
);
}
else
{
header
(
"
location: /registration.php
"
);
exit
();
}
Back
|
FazBrowse Home
|
New Git URL