PHP Test - II B ( Subjective )

6 Questions | Total Attempts: 121

Please wait...
PHP Test - II B ( Subjective )

PHP TEST - II B ( SUBJECTIVE )Test Duration : 4 Hours ( 240 Minutes )Test Type : Subjective Passing Score : 70%Instructions :YOU'RE BEING CLOSELY WATCHED1. DO NOT USE GOOGLE,2. DO NOT USE TRAINING FILES3. DO NOT ASK FOR HELP FROM THE OTHERS4. EXIT YOUR SKYPE WHILE YOU ARE GIVING THIS TESTTopic Covered:Concepts:- Forms- MySQL DB Connect + Table Creation- MySQL Datatypes- PHPMyAdmin- Data Insert to Table through Forms- Retrieve Data from Table Include / Require / Include Once / Require once- Limit, Group, Order Statements, Like, %%- File System- Create new File and add data&n


Questions and Answers
  • 1. 
    Please write the names of 5 string and 5 array functions.
  • 2. 
    FORM : write two valid values for "method" parameter in "Form" Tag. 
  • 3. 
    Create a function name "CreateFile" with 1 parameter which accepts the filename, when called will create a new file with text "hello dolly"for eg:CreateFile('abc.txt');$file = file_get_contents('abc.txt');print $file;output:hello dolly
  • 4. 
    Configuration FIle1. Create a configuration PHP file.2. in configuration file define the name of the project, version, description, author and connects a database3. Create a index file and include the configuration, print the project name and version on the Page title, and show the Author name on the Page body.
  • 5. 
    FILE HANDLING ( Attempt any 1 from 2 QUESTIONS )QUESTION 1 :Create a form in HTML, with1 select box  with name "operation" with options ( Prepend, Append and Overwrite )1 textarea with name  "description"1 submit button1 reset buttonIf the user selects Prepend operation, and submit the form, the data will be POSTED to a PHP file, and prepend the "description" in the file, in case of append it will append the description in the file, and in case of Overwrite, it will overwrite the content in the file.ORQUESTION 2 :Create a script that will run on every visit.The script will prepend this data to that file.The data would be :"Visitor Logged at Wed 24 Aug, 10:56am"Where "Wed 24 Aug, 10:56am"  would be the current time of visit. The file can log multiple visits and your file may look like :  Vistor logged at Wed 24 Aug, 11:06am Vistor logged at Wed 24 Aug, 10:58am Vistor logged at Wed 24 Aug, 10:58am Vistor logged at Wed 24 Aug, 10:57am Vistor logged at Wed 24 Aug, 10:56am Vistor logged at Wed 24 Aug, 10:56am
  • 6. 
    DATABASE : ( Attempt any 1 from 2 Questions )Que 1:Create a database "students" Create 1 tables "users" with columns ( id, name, rollno, marks, age, class)> Create 1 page to insert the user using HTML form> Create a page to show all the users with marks > 40orQue 2:Create a database "users" Create 1 tables "names" with columns ( id, username, password, name, email),  where password is encrypted with MD5> Create 1 page to make a login form and if the credentials are correct, it will say "Login is Successful" and in case of wrong login, it will say " Login UnSuccessful"> Create another page to show all the users with all information ( id, username, password, name and email )> Generate a Delete link, which when clicked will delete the user.