Hk479
Badges: 9
Rep:
?
#1
Report Thread starter 1 year 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.
0
reply
jAkE GiNgEr
Badges: 3
Rep:
?
#2
Report 1 year ago
#2
have u got the answer yet
0
reply
jAkE GiNgEr
Badges: 3
Rep:
?
#3
Report 1 year ago
#3
i need the answer
0
reply
Hk479
Badges: 9
Rep:
?
#4
Report Thread starter 1 year ago
#4
Hey try this $message = escape_tags($message);insertInto Database($message) $
0
reply
Suchomimus
Badges: 14
Rep:
?
#5
Report 1 year ago
#5
(Original post by Hk479)
Hey try this $message = escape_tags($message);insertInto Database($message) $
It is telling me to think about the order which you call the functions.
0
reply
Nicoliam
Badges: 1
Rep:
?
#6
Report 1 year 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:
?
#7
Report 1 year ago
#7
I don't understand?
0
reply
ali1232123
Badges: 1
Rep:
?
#8
Report 1 year 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:
?
#9
Report 9 months 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_; 9 months ago
2
reply
dddddrrrrrrr
Badges: 2
Rep:
?
#10
Report 9 months ago
#10
that dosent work
0
reply
dddddrrrrrrr
Badges: 2
Rep:
?
#11
Report 9 months 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:
?
#12
Report 9 months ago
#12
(Original post by dddddrrrrrrr)
it dosent work
It worked for me, sorry
0
reply
Raihan A
Badges: 1
Rep:
?
#13
Report 9 months ago
#13
Can anyone help me in the myFormData part really struggling
0
reply
Raihan A
Badges: 1
Rep:
?
#14
Report 9 months ago
#14
Name:  Capture S.PNG
Views: 182
Size:  38.4 KB I need urgent help someone pls help me I have attached the document
Attached files
0
reply
Pop-corn
Badges: 0
Rep:
?
#15
Report 8 months ago
#15
Does anyone know how to do the Fred’s deli part
0
reply
tinyminy13
Badges: 11
Rep:
?
#16
Report 8 months 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; 6 months ago
0
reply
Cdbidz45
Badges: 1
Rep:
?
#17
Report 6 months ago
#17
Yea this helps a lot thx first try
0
reply
tinyminy13
Badges: 11
Rep:
?
#18
Report 6 months ago
#18
(Original post by Raihan A)
Name:  Capture S.PNG
Views: 182
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; 6 months ago
0
reply
cjjstarr
Badges: 1
Rep:
?
#19
Report 3 months ago
#19
$message = $_POST['message'];$message = escape_tags($message);insertInto Database($message);It worked for me
0
reply
tinyminy13_Alt
Badges: 4
Rep:
?
#20
Report 2 months 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: 36
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

Do you have the space and resources you need to succeed in home learning?

Yes I have everything I need (223)
56.03%
I don't have everything I need (175)
43.97%

Watched Threads

View All