Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The mail () function returns a value of true if the message was sent successfull

ID: 3813009 • Letter: T

Question

The mail () function returns a value of true if the message was sent successfully and False if it was not In an all-in-one form, when the user clicks the submit button, the script submits the form to a separate processing script. The issent () function can be used to determine if the submit variable has been set (if the Submit button has been pressed). The unset() function is used to uninitialized a variable after it has been set. The directory pointer is a way of keeping track of where you are in a directory. You would use the file_put_contents() function to quickly replace the contents of a file or append data to the end of an existing file. The s_ENV autoglobal contains ___ variables that programs use to interact with the system. a. system b. environmental c. program d. script You can use ___ autoglobal array to refer to the global version of a variable from inside a function. a. SGLOBALS b. S_GLOBAL c. S_GLOBALS d. $GLOBAL The value of the ___ attribute identifies the program on the Web server that will process the form data when the form is submitted. a. action b. method c. name d. id When you click a form's submit button, each field on the form is sent to the Web server as a ___ pair. a. true/false b. name/value c. variable/value d. yes/no When you use the ___ method to submit form data to the processing script, the form data is appended to the method URL specified by the action attribute. a. get b. post c. request d. submit The PHP feature that automatically adds a backslash to any single quote, double quote, or NULL character contained in form data submits to a PHP script is ___ .

Explanation / Answer

15Ans: In php, as per the manual it is said that " mail() function will return true if the message is accepted for delivery, but it does not guarantee that it will be delivered". The return_value comes in handy when displaying the status message for user.

21. (b) Environmental --- S_ENV autoglogal contains "environmental" variables that the programs use to intrct with system.

22. (a) $GLOBALS --- To refer to global version of a variable from inside the function we can use "$GLOBALS".

23. (a) Action --- Action attribute value identify the program on web server which process form data when submitted.

24. (b) name/value --- when we click a form's submit button each field on form is sent to web_server as name/value pair.

25. (a) get --- The form data is appended to url specified by action attribute if we use "get" method.

26. Magic_quotes --- In php "magic_quotes" feature automatically adds a backslaash to any single quote, double quote or a NULL character.