MiaRakk
Badges: 3
Rep:
?
#1
Report Thread starter 1 year ago
#1
I cant seem to get the answer for the iDEA the Digital Citizen Part Two Name:  Screen Shot 2019-03-13 at 20.41.30.png
Views: 349
Size:  108.5 KB
1
reply
courtneyvinson
Badges: 4
Rep:
?
#2
Report 1 year ago
#2
here for the same answer
0
reply
samidea
Badges: 2
Rep:
?
#3
Report 1 year ago
#3
$myFormData = escape_tags($myFormdata);insertI ntoDatabase($myFormData) $
1
reply
hesham64_c
Badges: 2
Rep:
?
#4
Report 1 year ago
#4
the answer is: $myFormData = escape_tags(myFormData);
2
reply
liv230496
Badges: 1
Rep:
?
#5
Report 1 year ago
#5
$review = $_POST['review'];insertIntoDatabase($review);any one know the answer for this code to pass review through escape tag
0
reply
Rueben229
Badges: 2
Rep:
?
#6
Report 1 year ago
#6
(Original post by liv230496)
$review = $_POST['review'];insertIntoDatabase($review);any one know the answer for this code to pass review through escape tag
I don't know either, are you still stuck on this one or could you possibly help me???
0
reply
Slbramle
Badges: 2
Rep:
?
#7
Report 1 year ago
#7
Has anyone got the answer to this????
0
reply
18DG57
Badges: 2
Rep:
?
#8
Report 6 months ago
#8
$myFormData = escape_tags($myFormData);

I put this and it worked so try it out
1
reply
DOPEYSTRAW1125
Badges: 1
Rep:
?
#9
Report 6 months ago
#9
(Original post by 18DG57)
$myFormData = escape_tags($myFormData);

I put this and it worked so try it out
i will never forget you
0
reply
Leahliz_x
Badges: 1
Rep:
?
#10
Report 6 months ago
#10
Name:  image.jpg
Views: 135
Size:  144.6 KB iDEA citizen silver badge, third star. Keeps saying I need to sanitise my variable but I don’t know what it means and I’m not sure what I’m doing wrong. Can anyone help me with this?
1
reply
khadeja3082
Badges: 3
Rep:
?
#11
Report 6 months ago
#11
(Original post by hesham64_c)
the answer is: $myFormData = escape_tags(myFormData);
(Original post by 18DG57)
$myFormData = escape_tags($myFormData);

I put this and it worked so try it out
I tried it it doesnt work , what line and where should i put it
1
reply
khadeja3082
Badges: 3
Rep:
?
#12
Report 6 months ago
#12
(Original post by Rueben229)
I don't know either, are you still stuck on this one or could you possibly help me???
Did you get the answer what was itt
0
reply
tinyminy13
Badges: 11
Rep:
?
#13
Report 5 months ago
#13
The answer to sanitise the variable before it gets inserted into the database should be:

$myFormData = escape_tags($myFormData);
insertIntoDatabase($myFormData)

You only need to replace the first line with the escape_tags variable and replace $message to $myFormData.
Hope this helps!
Last edited by tinyminy13; 3 months ago
1
reply
50plus19
Badges: 1
Rep:
?
#14
Report 5 months ago
#14
yeh i need help on that one toohave you got an answer??
0
reply
tinyminy13
Badges: 11
Rep:
?
#15
Report 5 months ago
#15
The answer is:

$myFormData = escape_tags($myFormData);
insertIntoDatabase($myFormData)

P.S. I have already posted the answer three weeks ago on this forum and it's on #13 on this page.
Last edited by tinyminy13; 3 months ago
0
reply
TDARKZY9
Badges: 6
Rep:
?
#16
Report 4 months ago
#16
(Original post by DOPEYSTRAW1125)
i will never forget you
(Original post by 18DG57)
$myFormData = escape_tags($myFormData);

I put this and it worked so try it out
WRONG
1
reply
tomdackins
Badges: 3
Rep:
?
#17
Report 3 months ago
#17
(Original post by tinyminy13)
The answer to sanitise the variable before it gets inserted into the database
should be:

$myFormData = escape_tags($myFormData);
insertIntoDatabase($myFormData)

You only need to replace the first line with the escape_tags variable and replace $message to $myFormData.
Hope this helps!
ty so much
0
reply
18008562
Badges: 1
Rep:
?
#18
Report 3 months ago
#18
does anyone have the code for the business website hack? original code here=$review = $_POST[$'review'];insertIntoDatabase($review);
0
reply
tomdackins
Badges: 3
Rep:
?
#19
Report 3 months ago
#19
(Original post by tinyminy13)
The answer to it should be:

$review = escape_tags($review);
insertIntoDatabase($review)

You only need to replace the first line with the escape_tags variable.
Hope this helps!
it did not work
1
reply
msjvr
Badges: 3
Rep:
?
#20
Report 3 months ago
#20
(Original post by Leahliz_x)
Name:  image.jpg
Views: 135
Size:  144.6 KB iDEA citizen silver badge, third star. Keeps saying I need to sanitise my variable but I don’t know what it means and I’m not sure what I’m doing wrong. Can anyone help me with this?
For anyone who is stuck on this one.
This is the original code:
$message = $_POST['message'];
insertIntoDatabase($message);

You need to change it to:
$message = escape_tags($message);
insertIntoDatabase($message);

I realised I did everything but the square brackets have been the thing that has caused me to be stuck on this one for a while. So you need to change it to these brackets (). Its worked for me, let me know if it has worked for anyone of you guys!


Drop here!
Attached files
Last edited by msjvr; 3 months ago
1
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

Current uni students - are you thinking of dropping out of university?

Yes, I'm seriously considering dropping out (172)
14.63%
I'm not sure (54)
4.59%
No, I'm going to stick it out for now (345)
29.34%
I have already dropped out (35)
2.98%
I'm not a current university student (570)
48.47%

Watched Threads

View All