I did a test
with
htmlspecialchar
s in the past.
When I display
the text, it
shows <
>
&
"
rather than
< >
".
As to the
addslash and
stripslash,
thank you.
I've been
wanting a exact
answer on that
for sometime,
never could get
it. I start my
classes at
college next
week, I learned
on my own so
far, so I never
could ask a
professor.
Currently I
have before any
updates or
inserts into my
database. I
have it remove
tags(script,inp
ut,textarea,etc
) and all
harmful
characters
(such as -- and
$ and more).
Like I said, it
isn't a good
system for a
user who wants
to use the
dollar sign for
money. I used
a lot of
strings to weed
out hacking.
That is
something else
I'd like to
ask.
I've seen many
times in the
tuts here, this
method to
verify
inputs.
Code:
$total_page_len
=
strlen($_GET['
u']);
$_GET['u']
=
str_replace($ar
r, '',
$_GET['u']);<
br />
$verify_total_p
age =
$_GET['u'];
if(strlen($veri
fy_total_page)
!=
$total_page_len
) {
die('ERROR IN
U!');
}
Why not use
this, it is
half the
code.
Code:
str_ireplace($a
rr, '',
$_GET['u'],
$count);
if($count >
0) die('ERROR
IN U!');
It does the
same thing,
strlen is
really
pointless.
Unless my
method uses
more resources
in the long
run, than I can
understand, but
it way easier.
Coding is
simply CST...
Combining $hit
Together. We
make different
$hit to run in
unison
correctly. |