I have tried
the PHP_SELF
just like in
the tutorial. I
kept getting
error messages.
Here is the
rigistration
code that i am
using. Can you
please tell me
where and hot
to isert the
code you
stated:
Code:
<!DOCTYPE
html PUBLIC
"-//W3C//
DTD XHTML 1.0
Transitional//E
N"
"http://w
ww.w3.org/TR/xh
tml1/DTD/xhtml1
-transitional.d
td">
<html
xmlns="ht
tp://www.w3.org
/1999/xhtml&qu
ot;>
<head>
<meta
http-equiv=&qu
ot;Content-Type
"
content="
text/html;
charset=utf-8&
quot; />
<title>Un
titled
Document</ti
tle>
</head>
<body>
<form
name="reg
istration_form
"
method="p
ost"
action="r
egister1.php&q
uot;
onsubmit="
;return
Validate();&qu
ot;>
<table
width="10
0%"
border="0
"
cellpadding=&q
uot;4"
cellspacing=&q
uot;0">
;
<tr>
<td
width="24
%"
align="le
ft"
valign="t
op">Na
me*</td>
<td
width="76
%"><
;input
type="tex
t"
name="nam
e"><
;/td>
</tr>
<table
width="10
0%"
border="0
"
cellpadding=&q
uot;4"
cellspacing=&q
uot;0">
;
<tr>
<td
width="24
%"
align="le
ft"
valign="t
op">Em
ail
Address*</td
>
<td
width="76
%"><
;input
type="tex
t"
name="ema
il">&l
t;/td>
</tr>
<table
width="10
0%"
border="0
"
cellpadding=&q
uot;4"
cellspacing=&q
uot;0">
;
<tr>
<td
width="24
%"
align="le
ft"
valign="t
op">Us
ername*</td&
gt;
<td
width="76
%"><
;input
type="tex
t"
name="use
rname">
;</td>
</tr>
<table
width="10
0%"
border="0
"
cellpadding=&q
uot;4"
cellspacing=&q
uot;0">
;
<tr>
<td
width="24
%"
align="le
ft"
valign="t
op">Pa
ssword*</td&
gt;
<td
width="76
%"><
;input
type="pas
sword"
name="pas
sword">
;</td>
</tr><
table
width="10
0%"
border="0
"
cellpadding=&q
uot;4"
cellspacing=&q
uot;0">
;
<tr>
<td
width="24
%"
align="le
ft"
valign="t
op">Re
type
Password*</t
d>
<td
width="76
%"><
;input
type="pas
sword"
name="pas
sword_confirmat
ion">&
lt;/td>
</tr><
table
width="10
0%"
border="0
"
cellpadding=&q
uot;4"
cellspacing=&q
uot;0">
;
<tr>
<td
width="24
%"
align="le
ft"
valign="t
op">Ph
one
Number*</td&
gt;
<td
width="76
%"><
;input
type="tex
t"
name="pho
ne_number"
;></td>
;
</tr>
<tr>
<td
align="le
ft"
valign="t
op">&a
mp;nbsp;</td
>
<td><i
nput
type="sub
mit"
name="Sub
mit"
value="Re
gister"&g
t;</td>
</tr>
</table>
<script
language =
"Javascri
pt">
function
Validate()
{
if
(document.regis
tration_form.na
me.value ==
'')
{
alert('Please
fill in your
name!');
return
false;
}
if
(document.regis
tration_form.em
ail.value ==
'')
{
alert('Please
fill in your
email
address!');
return
false;
}
if
(document.regis
tration_form.us
ername.value ==
'')
{
alert('Please
fill in your
desired
username!');
return
false;
}
if
(document.regis
tration_form.pa
ssword.value ==
'')
{
alert('Please
fill in your
desired
password!');
return
false;
}
if
(document.regis
tration_form.pa
ssword_confirma
tion.value ==
'')
{
alert('Please
fill in your
password again
for
confirmation!'
);
return
false;
}
if
(document.regis
tration_form.pa
ssword.value !=
document.regist
ration_form.pas
sword_confirmat
ion.value)
{
alert("Th
e two passwords
are not
identical!
"+
"Please
enter the same
password again
for
confirmation&q
uot

;
return
false;
}
if
(document.regis
tration_form.ph
one_number.valu
e == '')
{
alert('Please
fill in your
phone
number!');
return
false;
}
return
true;
}
</script>
</body>
</html>