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
Report Thread starter 2 years ago
#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.
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
Report 2 years ago
#2
have u got the answer yet
0
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.
#3
Report 2 years ago
#3
i need the answer
0
reply
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
Report Thread starter 2 years ago
#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 2 years ago
#5
(Original post by Hk479)
Hey try this $message = escape_tags($message);insertIntoDatabase($message) $
It is telling me to think about the order which you call the functions.
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 2 years ago
#6
(Original post by jAkE GiNgEr)
have u got the answer yet
Hi all you have to do is write it in the right place (which is the middle of the first two sentences)
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
Report 2 years ago
#7
I don't understand?
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.
#8
Report 2 years ago
#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)
i dont understand, how to resolve this issue
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 2 years ago
#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.
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
Report 2 years ago
#10
that dosent work
0
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.
#11
Report 2 years ago
#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.
it dosent work
Attached files
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
Report 2 years ago
#12
(Original post by dddddrrrrrrr)
it dosent work
It worked for me, sorry
0
reply
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
Report 2 years ago
#13
Can anyone help me in the myFormData part really struggling
0
reply
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
Report 2 years ago
#14
Name:  Capture S.PNG
Views: 590
Size:  38.4 KB I need urgent help someone pls help me I have attached the document
Attached files
1
reply
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
Report 2 years ago
#15
Does anyone know how to do the Fred’s deli part
0
reply
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 2 years ago
#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!
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
Report 2 years ago
#17
Yea this helps a lot thx first try
0
reply
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 2 years ago
#18
(Original post by Raihan A)
Name:  Capture S.PNG
Views: 590
Size:  38.4 KB I need urgent help someone pls help me I have attached the document
This is the solution:

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 1 year ago
#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 1 year ago
#20
(Original post by Pop-corn)
Does anyone know how to do the Fred’s deli part
This is the solution:

Name:  Screenshot_2020-07-30 iDEA - The Digital Citizen Part Three.png
Views: 368
Size:  34.4 KB
Hope this helps!
P.S. I have also uploaded an attachment if you can't see it.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Were exams easier or harder than you expected?

Easier (21)
26.92%
As I expected (24)
30.77%
Harder (29)
37.18%
Something else (tell us in the thread) (4)
5.13%

Watched Threads

View All