All fields

“Form Handling & Validation” in Information Technology

51 questions across 6 technologies.

Information Technology

51 questions in 6 technologies

#QuestionTechnologyTopicLevel
1What is the purpose of validating user submitted form data, and what basic validation checks are commonly performed? PHP › Form Handling & ValidationPHPForm Handling & ValidationBeginner
2Why is server side validation always necessary even when client side JavaScript validation is already in place on a form? PHP › Form Handling & ValidationPHPForm Handling & ValidationIntermediate
3How do modern PHP frameworks like Laravel simplify form validation compared to writing manual validation checks by hand? PHP › Form Handling & ValidationPHPForm Handling & ValidationIntermediate
4How should a complex, multi step form, such as a checkout process, handle validation and state management across multiple pages while maintaining data integrity and security? PHP › Form Handling & ValidationPHPForm Handling & ValidationAdvanced
5How do you retrieve data submitted through an HTML form using PHP, and what is the difference between the GET and POST methods? PHP › Form Handling & ValidationPHPForm Handling & ValidationBeginner
6How does Cross-Site Request Forgery protection work for form submissions, and why is including a CSRF token in every form considered essential? PHP › Form Handling & ValidationPHPForm Handling & ValidationAdvanced
7How does PHP's filter_var function help validate and sanitize different types of user input, such as emails, URLs, and integers? PHP › Form Handling & ValidationPHPForm Handling & ValidationIntermediate
8How do you validate form data on the server before saving it, and show validation errors back to the user? Next.js › Form Handling & Validation in Next.jsNext.jsForm Handling & Validation in Next.jsIntermediate
9How do you submit a form directly to a server action in Next.js without writing any client side JavaScript? Next.js › Form Handling & Validation in Next.jsNext.jsForm Handling & Validation in Next.jsBeginner
10How do you show a pending or loading state while a form is being submitted using a server action? Next.js › Form Handling & Validation in Next.jsNext.jsForm Handling & Validation in Next.jsIntermediate
11How should a form properly and clearly handle and display a genuine server side validation error, such as discovering that a specific chosen username is already actually taken, that genuinely cannot actually be determined purely through simple client side validation logic alone? Flutter › Forms & Input Validation in FlutterFlutterForms & Input Validation in FlutterIntermediate
12How would you handle file uploads through a form using a server action in Next.js? Next.js › Form Handling & Validation in Next.jsNext.jsForm Handling & Validation in Next.jsAdvanced
13What is optimistic UI, and how can you apply it to a form submission for a better user experience? Next.js › Form Handling & Validation in Next.jsNext.jsForm Handling & Validation in Next.jsAdvanced
14How does PHP handle file uploads submitted through an HTML form, and what information does the $_FILES superglobal provide? PHP › File Upload HandlingPHPFile Upload HandlingBeginner
15How do you handle multiple file uploads submitted from a single form field, and what does the resulting $_FILES array structure look like? PHP › File Upload HandlingPHPFile Upload HandlingIntermediate
16What role does the [ApiController] attribute play in automatically handling certain error scenarios without explicit exception handling code? ASP.NET Core › Error HandlingASP.NET CoreError HandlingIntermediate
17How does content negotiation handle the request body (input formatters) differently from the response body (output formatters)? ASP.NET Core › Content Negotiation & Output FormattersASP.NET CoreContent Negotiation & Output FormattersAdvanced
18How does the useFormState hook, sometimes called useActionState, let you show validation errors returned from a server action? React › Server Actions & Data MutationsReactServer Actions & Data MutationsAdvanced
19How do you write a custom 'type=' validation function for argparse that raises a properly-formatted error for invalid input? Python › Command-Line Interfaces (argparse)PythonCommand-Line Interfaces (argparse)Advanced
20How should an API validate the structure and types of incoming JSON data to ensure it matches the expected schema before processing it further? PHP › JSON Handling in PHPPHPJSON Handling in PHPAdvanced
21How do you send an HTML formatted email with an embedded image or attachment using PHPMailer? PHP › Email Sending in PHP (PHPMailer & SMTP)PHPEmail Sending in PHP (PHPMailer & SMTP)Intermediate
22What is cross site request forgery, commonly called CSRF, and how do CSRF tokens help protect forms from this type of attack? PHP › SecurityPHPSecurityIntermediate
23Why is validating and sanitizing file uploads important, and what specific checks should you perform to prevent an attacker from uploading a malicious file? PHP › SecurityPHPSecurityIntermediate
24What are common performance and security pitfalls to avoid when building API routes at scale? Next.js › API RoutesNext.jsAPI RoutesAdvanced
25What security considerations should be addressed when building an application feature that sends emails based on user input, such as a contact form or password reset flow? PHP › Email Sending in PHP (PHPMailer & SMTP)PHPEmail Sending in PHP (PHPMailer & SMTP)Advanced
26How should a RESTful API be designed to handle complex error responses consistently, including validation errors affecting multiple fields at once? PHP › RESTful API Development with PHPPHPRESTful API Development with PHPAdvanced
27How do you write a custom IValidateOptions<T> implementation for validation logic beyond what DataAnnotations attributes can express? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternAdvanced
28How do you read query parameters and the request body inside an API route? Next.js › API RoutesNext.jsAPI RoutesBeginner
29What is a server action in Next.js, and what problem does it solve? Next.js › Server Actions & MutationsNext.jsServer Actions & MutationsBeginner
30What are PHP superglobals, and what are some of the most commonly used ones? PHP › Constants & SuperglobalsPHPConstants & SuperglobalsBeginner
31How does PHP's built in mail function work, and why is it generally not recommended for production applications? PHP › Email Sending in PHP (PHPMailer & SMTP)PHPEmail Sending in PHP (PHPMailer & SMTP)Beginner
32What is a prepared statement in PDO, and why is using one considered essential for writing secure database queries? PHP › PDO & DatabasesPHPPDO & DatabasesBeginner
33What is a regular expression, and how do you use PHP's preg_match function to check whether a string matches a specific pattern? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPBeginner
34What do common regular expression metacharacters like the dot, asterisk, and plus sign mean, and how are they used to build flexible matching patterns? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPBeginner
35What is SQL injection, and how does using prepared statements with PDO help prevent this common vulnerability in PHP applications? PHP › SecurityPHPSecurityBeginner
36What is cross site scripting, commonly called XSS, and how does properly escaping output help prevent it? PHP › SecurityPHPSecurityBeginner
37What is a cookie, and how does it differ from a session in terms of where the actual data is stored? PHP › Sessions & CookiesPHPSessions & CookiesBeginner
38How do Blade and Twig automatically escape output by default, and why is this an important security feature? PHP › Template Engines (Blade & Twig)PHPTemplate Engines (Blade & Twig)Beginner
39How do you read query parameters and the request body inside a route handler? Next.js › Route Handlers (API Route.js)Next.jsRoute Handlers (API Route.js)Intermediate
40How do you protect a Next.js application against cross site scripting attacks? Next.js › Security Best Practices in Next.jsNext.jsSecurity Best Practices in Next.jsIntermediate
41How do you safely retrieve values from superglobals like $_GET or $_POST to avoid undefined index errors and potential security issues? PHP › Constants & SuperglobalsPHPConstants & SuperglobalsIntermediate
42How does preg_replace let you find and replace text matching a regular expression pattern, and how do capture groups let you reuse parts of the matched text in the replacement? PHP › Regular Expressions in PHPPHPRegular Expressions in PHPIntermediate
43What are the httponly and secure flags on a cookie, and why are they important for protecting session cookies specifically? PHP › Sessions & CookiesPHPSessions & CookiesIntermediate
44How does Psalm's concept of taint analysis help detect potential security vulnerabilities like SQL injection or cross site scripting during static analysis? PHP › Static Analysis (PHPStan & Psalm)PHPStatic Analysis (PHPStan & Psalm)Intermediate
45How do commonly used string functions like strlen, substr, str_replace, and trim help with everyday text processing tasks in PHP? PHP › Strings & String FunctionsPHPStrings & String FunctionsIntermediate
46Why are the multibyte string functions, such as mb_strlen and mb_substr, important when working with text that contains non ASCII characters like accented letters or emoji? PHP › Strings & String FunctionsPHPStrings & String FunctionsIntermediate
47Why is properly sanitizing input and escaping output especially critical in WordPress plugin and theme development, and what built in WordPress functions help with this? PHP › WordPress Plugin & Theme DevelopmentPHPWordPress Plugin & Theme DevelopmentIntermediate
48How would you protect server actions from being called with malicious or unauthorized data, since they can be invoked directly from the client? Next.js › Security Best Practices in Next.jsNext.jsSecurity Best Practices in Next.jsAdvanced
49How would you handle errors gracefully inside a server action and display a meaningful message to the user? Next.js › Server Actions & MutationsNext.jsServer Actions & MutationsAdvanced
50How would you implement optimistic state updates for a feature like a like button, so the interface feels instant while a server action processes the actual update? Next.js › State Management in Next.js AppsNext.jsState Management in Next.js AppsAdvanced
51How would you create strongly typed server actions that validate their input and return a predictable, typed result? Next.js › TypeScript with Next.jsNext.jsTypeScript with Next.jsAdvanced