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

  Write a c program that reads in five numbers

Q1. (Bar Chart /Histogram printing) Write a C program that reads in five numbers (each between 1 and 30). For each number read, your program should print a line containing that number of adjacent asterisks. For example, if your program reads the numb..

  Write a script that creates a craps game

Write a script that creates a craps game and meets the following requirements. Name the script craps.sh The script will get 2 random numbers between 1-6.

  Design a class named employeerecord

Design a class named EmployeeRecord that holds an employee's ID number, name, and payrate. Include mutator methods to set the values for each data field and output the values for each data field. Create the class diagram and write the code that

  Write a bouncing ball video game

The balls bounces within the screen where the two horizontal walls are fixed

  Calculate that implements a simple arithmetic calculator

Write a  C program  calc.c that implements a simple arithmetic calculator. Input to the calculator consists of lines composed of integer constants separated by the five arithmetic operators used in C: +, -, *, /, and %. For each line of input,

  Program to check compatibity for matrix multiplication

Write down program in C++ for matrix multiplication. Program must accept dimension of both matrices to be multiplied and check for compatibity.

  Calculates different formulas that converge to the number pi

Write a C program (Care should be taken not to use extensions of C + + language in your work ) that calculates different formulas that converge to the number  pi,  to compare the speed of convergence of these formulas. Each form will be calculated by..

  Create a text file named grades.txt

Write a program to calculate students' average test scores and their grades. Creat a text file named  grades.txt

  Write program to count occurrences of each word in text

Write down C++ program to read following text. Count occurrences of each word in text and keep this count in list of elements containing (word, occurrence count) pairs.

  Write a program that asks the user to enter the names of 3

Write a program that asks the user to enter the names of three salesmen. The program should thenaccept the sales produced for salesman for each quarter of the year. Display the name, and the totalsales amount, of each salesman.

  Function named sort that takes three integer parameter

Write a function named sort that takes three integer parameters by reference. The function should rearrange the parameter values so that the first parameter gets set to the smallest value, the second parameter gets set to the second smallest value, a..

  C program to randomly generate more than ten ip address

Write C or C++ program which Randomly generates more than 10 IP addresses written in decimal format and write results in text file (e.g. Dec_IPAddresses.txt)

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