Assume we have an array named $students

Assignment Help C/C++ Programming
Reference no: EM13165982

Write the PHP code needed to accomplish the requested task (you will need to utilize at least one of the PHP string functions in every question):

  1. Assume we have just read a string value from a web page form and stored that value into the string variable $username. Write the PHP code needed to check if the username that was entered is equal to "ADMIN" (upper or lower case, or combination of the two). If the admin username was entered display the string "Admin access is not allowed from your IP Address". For any other username display the string "Enter your password".

2.Assume we have an array named $passwords that contains passwords (strings) for our system. Passwords that are shorter than 6 characters are to be revoked. Write the PHP code that scans the $passwords array and displays all passwords that are less than 6 characters long.

3.Assume we have just read a string value from a web page form and stored that value into the string variable named $friends. The string stores a list of friends, each separated by a comma. We want to convert the string to an array named $friendArray - that is we want each name to be placed in one entry of the array. Write the PHP code that places the $friends names into the array $friendArray. Then write the code needed to scan the array for the name "Santa Claus" or "Easter Bunny". If any of these names appear display the message "Very Funny - Do you also know Mickey Mouse?"

4.Assume we have an array named $students. Each entry in the array contains a student's full name (e.g. "Jane Smith"). Write the PHP code needed to display all students (in the array) whose first name starts with the letter "J".

5.As in Question 4 assume we have an array named $students. Each entry in the array contains a student's full name (e.g. "Jane Smith"). Write the PHP code needed to display all students (in the array) whose LAST name begins with the letter "S". Hint: Find the location of the space character within the full name. The first letter of the last name is located in the next position.

Reference no: EM13165982

Questions Cloud

What is the concentration of the reactant b : A certain second-order reaction (B--> products) has a rate constant of 1.40×10^-3 M^-1*s^-1 at 27 Celsius and an initial half-life of 280s . What is the concentration of the reactant B after one half-life?
State model triglyceride with naoh and h2o : draw the organic product you would expect to obtain from reaction of the following model triglyceride
Write a program for a college''s admissions office : Write a program for a college's admissions office. Create variables that store a numeric high school grade point average andan admission test score.Print the message "Accept" if the studenthas any of the following:
Change the color of the text in the redlabel to red : Write that visual basic instruction to change the color of the text in the redlabel to red.
Assume we have an array named $students : Assume we have an array named $students. Each entry in the array contains a student's full name (e.g. "Jane Smith"). Write the PHP code needed to display all students (in the array) whose first name starts with the letter "J".
Send a printout of interface to the printer : write a visual basic instruction to specify that of printform1 control should send a printout of interface to the printer.
State significant difference between bacteria and eukaryotes : There are significant differences between Bacteria and Eukaryotes in the manner in which genetic information becomes functional gene product
What is the predicted freezing point of solution : A skyscraper in Pittsburg, built in the early 1970's, is supported by water filled columns. Potassium carbonate was added to the water to precent freezing during cold weather. If the solution is 40.0% K2CO3 by mass, what is the predicted freezing ..
Culture and society has influenced eating disorders : Discuscribe the way culture and society has influenced eating disorders. Discuss why eating disorders are more prevalent in western civilization than in other cultures. Use specific examples to support your answer.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Local resturant automate its breakfast billing system

Use an array , menuList, of the struct menuItemType. use an array, menuList, of the struct menuItemType. your program must contain at least the following functipons : your program must contain at least the following functipons.

  Add a copy constructor

Take the code below and add a copy constructor, assignment operator definition and destructor to the class. These functions have already been started for you.

  Assessment system of a university

Write a program for Assessment system of a University

  Write a c++ program that prompts the user for a double

Write a C++ program that prompts the user for a double that should be between 0 and 100. If the value entered is outside of the interval the program will print an error message. The program should continue to repeat until the user enters an appropria..

  Implement method to advance any given date by one day

Write C++ implementation of this method. Create and specify any other methods that you require. Include comments which will be helpful to someone who will maintain implementation in the future.

  Write a program to read only one integer number

Write a program to read ONLY one integer number (your input must be one 3 digit number from 100 to 999), and to think of a number as being ABC (where A, B, and C are the 3 digits of a number)

  Write the output of the program

Design a C++ program that will interactively prompt for and read the name of the input file interactively prompt for and read the name of a file to write the output of the program to write the following to the specified output file your name, sect..

  Ruby implement primitive types

How does Ruby implement primitive types, such as those for integer and floating-point data?  3-What is the single most important practical difference between Smalltalk and C++?

  C program to solve the quadratic equation of rocket launch

Write a C program to solve the quadratic equation of rocket launch by computing the roots (t1 and t2) of that quadratic equation: gt2 + vt + l = 0 (or) for simplicity ax2 + bx + c = 0. Get the values of g, v, and l from the user. The program should d..

  Write program function prompt user for number of elements

Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements.

  Write a recursive function that takes a string as parameter

Write a recursive function that takes a string as a parameter and prints its reversal in the same function in c++

  Create class integerset

Create class IntegerSet for which each object can hold integers in the range 0 through 100. Represent the set internally as a vector of bool values. Element a[i] is true if integer i is in the set. Element a[j] is false if integer j is not in the set..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd