iDEA Silver Badge Citizen Resolution
Watch this thread
Hk479
Badges:
9
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#1
I am stuck on how to sanitise the code: $message. I tried doing...
$message = escape_tags($message) but it won't work. If you know the answer please comment below. Thanks.
$message = escape_tags($message) but it won't work. If you know the answer please comment below. Thanks.
1
reply
jAkE GiNgEr
Badges:
3
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#2
jAkE GiNgEr
Badges:
3
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#3
Hk479
Badges:
9
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#4
Hey try this $message = escape_tags($message);insertIntoDatabase($message) $
0
reply
Suchomimus
Badges:
14
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#5
Report
#5
(Original post by Hk479)
Hey try this $message = escape_tags($message);insertIntoDatabase($message) $
Hey try this $message = escape_tags($message);insertIntoDatabase($message) $
0
reply
Nicoliam
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#6
Report
#6
(Original post by jAkE GiNgEr)
have u got the answer yet
have u got the answer yet
0
reply
ali1232123
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#7
ali1232123
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#8
Report
#8
(Original post by Nicoliam)
Hi all you have to do is write it in the right place (which is the middle of the first two sentences)
Hi all you have to do is write it in the right place (which is the middle of the first two sentences)
0
reply
Dylanlieb_
Badges:
3
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#9
Report
#9
I know this may be a bit late but, if you have just the original two lines you simply but the code above into the middle of the two lines it should work.
$message = $_POST['message']; $message = escape_tags($message);insertInto Database($message) $insertIntoDatabase($message);
This is what it looks like.
$message = $_POST['message']; $message = escape_tags($message);insertInto Database($message) $insertIntoDatabase($message);
This is what it looks like.
Last edited by Dylanlieb_; 2 years ago
3
reply
dddddrrrrrrr
Badges:
2
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#10
dddddrrrrrrr
Badges:
2
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#11
Report
#11
(Original post by Dylanlieb_)
I know this may be a bit late but, if you have just the original two lines you simply but the code above into the middle of the two lines it should work.
$message = $_POST['message']; $message = escape_tags($message);insertInto Database($message) $insertIntoDatabase($message);
This is what it looks like.
I know this may be a bit late but, if you have just the original two lines you simply but the code above into the middle of the two lines it should work.
$message = $_POST['message']; $message = escape_tags($message);insertInto Database($message) $insertIntoDatabase($message);
This is what it looks like.
1
reply
Dylanlieb_
Badges:
3
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#12
Raihan A
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#13
Raihan A
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#14
Pop-corn
Badges:
0
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#15
tinyminy13
Badges:
11
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#16
Report
#16
The answer to sanitise the variable before it gets inserted into the database
should be:
$myFormData = escape_tags($myFormData);
insertIntoDatabase($myFormData)
Hope this helps!
should be:
$myFormData = escape_tags($myFormData);
insertIntoDatabase($myFormData)
Hope this helps!
Last edited by tinyminy13; 2 years ago
2
reply
Cdbidz45
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#17
tinyminy13
Badges:
11
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#18
Report
#18
P.S. I have posted two screenshots because they are both correct but you only forgot to use the restart code (block) as you should drag it or place it next to the incorrect code (block).
Last edited by tinyminy13; 2 years ago
0
reply
cjjstarr
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#19
Report
#19
$message = $_POST['message'];$message = escape_tags($message);insertIntoDatabase($message);It worked for me
0
reply
tinyminy13_Alt
Badges:
4
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#20
Report
#20
(Original post by Pop-corn)
Does anyone know how to do the Fred’s deli part
Does anyone know how to do the Fred’s deli part
Hope this helps!
P.S. I have also uploaded an attachment if you can't see it.
0
reply
X
Quick Reply
Back
to top
to top