Junior PHP Developer Question:

Tell us how can we access the data sent through the URL with the POST method?

Junior PHP Developer Interview Question
Junior PHP Developer Interview Question

Answer:

To access the data sent this way, you use the $_POST array.

Imagine you have a form field called ‘var’ on the form, when the user clicks submit to the post form, you can then access the value like this:

$_POST[“var”];


Previous QuestionNext Question
Tell me is it possible to remove the HTML tags from data?Tell me what is use of in_array() function in php?