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

  Program to compute surface area of sphere using function

Write down a program in C++ to compute surface area of sphere using a function. As sample run, write down the surface areas of spheres with radii.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design for storing the maze layout

Design and implement a C++ program for maze layout

  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 in c++ another overloaded operator

Write in C++ another overloaded operator to go in the program that has Treasury. Overload the forward slash /  so that in the main program, you can declare sale to be of type Treasury, and commission to be of type Treasury, and commispctage to be of ..

  Write a method, to be included in a template unsorted list

Write a method, to be included in a template unsorted list class that will print (or reurn) the smallest and the largest values in the list.

  Write a program using one while loop

Write a program using one while loop that will read in a sequence of integers guaranteed to be within the inclusive range of 0 through 99,999 from the user

  Write in c++ another overloaded operator

Write in C++ another overloaded operator to go in the program that has Treasury. Overload the forward slash /  so that in the main program, you can declare sale to be of type Treasury, and commission to be of type Treasury, and commispctage to be of ..

  Develop a two dimensional interactive game

The player starts as a disk, but can "morph" (that is expand and contract) in selected directions

  What output would be produced by the program segment

What output would be produced by the following program segment?

  Assessment system of a university

Write a program for Assessment system of a University

  Searching f and removing certain states from the hash table

use the class hashT, ''Hashing: Implementation Using Quadratic Probing,'' which uses quadratic probing to resolve collision, to create a hash table to keep track of each state's information. Use the state's name as the key to determine the hash addre..

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