The Student Room Group

iDEA Silver Badge award..

I cant seem to get the answer for the iDEA the Digital Citizen Part Two Screen Shot 2019-03-13 at 20.41.30.png

Scroll to see replies

Reply 1

here for the same answer

Reply 2

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

Reply 3

the answer is: $myFormData = escape_tags(myFormData);

Reply 4

$review = $_POST['review'];insertIntoDatabase($review);anyone know the answer for this code to pass review through escape tag

Reply 5

Original post by liv230496
$review = $_POST['review'];insertIntoDatabase($review);anyone 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???

Reply 6

Has anyone got the answer to this????

Reply 7

$myFormData = escape_tags($myFormData);

I put this and it worked so try it out

Reply 8

Original post by 18DG57
$myFormData = escape_tags($myFormData);

I put this and it worked so try it out

i will never forget you

Reply 9

image.jpg 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?

Reply 10

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

Reply 11

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

Reply 12

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!
(edited 4 years ago)

Reply 13

yeh i need help on that one toohave you got an answer??

Reply 14

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.
(edited 4 years ago)

Reply 15

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

Reply 16

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

Reply 17

does anyone have the code for the business website hack? original code here=$review = $_POST[$'review'];insertIntoDatabase($review);

Reply 18

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

Reply 19

Original post by Leahliz_x
image.jpg 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!
(edited 4 years ago)

Quick Reply