1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vlabodo [156]
3 years ago
7

Create a PHP page that contains an array of at least 20 movie titles or book titles (your choice). The HTML page should have an

input box for the user to enter a username and a title of a favorite movie or a book. After the user enters a username, the page should display a welcome message.
Computers and Technology
1 answer:
ella [17]3 years ago
5 0

Answer:

This is the code

Explanation:

<html>

<form method="POST" action="welcome.php">

label for="usname">username:</label><br>

<input type="text" id="usname" name="usname"><br>

<label for="movietitles">Movietitles</label><br>

<textarea type="text" id="movetitle" name="movietitles">Please enter movie titles</textarea>

<input type="submit">

</form>

</html>

<?php

$Movietitles= array("bland", "decoy","Mademan", "Rich", "bland", "decoy","Mademan", "Rich", "bland", "decoy","Mademan", "Rich" , "bland", "decoy","Mademan", "Rich, "decoy","Mademan", "Rich", "Adapt" );

$username= $_POST['username'];

if (!empty($_POST['username'])) {

$username = $_POST['username'];

echo "Welcome";

}

?>

The post method HTTP request is used to send the data from the form to the Welcome.php file above so that it validates/tests that username has been entered using the php if statement and if it is not empty(entered username) php "echos" welcome to the screen.

You might be interested in
The term "resolution" refers to ______.
Usimov [2.4K]

Options A and C can get you confused. We can choose option A if our argument is based entirely on digital images. The correct answer, however, is  C: Number of pixels you see on your computer monitor.

Resolution describes the clarity and sharpness of a picture that can be measured by the number of pixels contained on a display monitor. It can be expressed by the number of horizontal (width) and vertical pixels (height) represented by a screen. The clarity and sharpness are always dependent on the resolution and size of the monitor.

4 0
3 years ago
Read 2 more answers
Write a program that dynamically allocates an array large enough to hold a user-defined number of test scores. Once all the scor
Anastasy [175]

Answer:

// Program written in C++

// Comments are used to explain some lines

#include <iostream>

#include <iomanip>

using namespace std;

// Functions

void getData(double *, int);

void selectionSort(double *, int);

double getAverage(double *, int);

void displayData(double *, int, double);

int main() //Main Method

{

double *ToTest, // To dynamically allocate an array

Average; // To hold the average of the scores

int Scores; // To hold number of scores

// Get number of scores

cout << "Number of average to find? ";

cin >> Scores;

// Allocate an array to number of scores

ToTest = new double[Scores];

getData(ToTest, Scores);

selectionSort(ToTest, Scores);

Average = getAverage(ToTest, Scores);

printData(ToTest, Scores, Average);

return 0;

}

//Get Data

void getData(double *ToTest, int Scores)

{

cout << "Enter each scores.\n";

for (int i = 0; i < Scores; i++)

{

do

{

cout << "Score #" << (i + 1) << ": ";

cin >> *(ToTest + i);

if (*(ToTest + i) < 0)

{

cout << "Scores must be greater than 0.\n"

<< "Re-enter ";

}

} while (*(Test + i) < 0);

}

}

// Selection Sort

void selectionSort(double *ToTest, int Scores)

{

int startscan, minIndex;

double minValue;

for (startscan = 0; startscan < (Scores - 1); startscan++)

{

minIndex = startscan;

minValue = *(ToTest + startscan);

for (int i = startscan + 1; i < Scores; i++)

{

if (*(ToTest + i) < minValue)

{

minValue = *(Test + i);

minIndex = i;

}

}

*(ToTest + minIndex) = *(ToTest + startscan);

*(ToTest + startscan) = minValue;

}

}

// Calculate Average

double getAverage(double *ToTest, int Scores)

{

double Total;

for (int i = 0; i < Scores; i++)

{

Total += *(ToTest + i);

}

return Total / Scores;

}

// Print Data

void printData(double *ToTest, int Scores, double Avg)

{

cout << "\n Test scores\n";

cout << "Number of scores: " << Scores << endl;

cout << "Scores in ascending-order:\n";

for (int i = 0; i < Scores; i++)

{

cout << "#" << (i + 1) << ": " << *(ToTest + i) << endl;

}

cout << fixed << showpoint << setprecision(2);

cout << "Average score: " << Avg << endl;

}

6 0
2 years ago
Why will my note 5 not download videos from the web?
meriva
Try downloading an app if the phone is not doing it.
7 0
3 years ago
W t f is a ground fault circuit interrupter?
LuckyWell [14K]

lol you are awesome but to break it down for you a circuit inter-putter is is a plug in the is on the floor i have 2 of these in my home. i hope this helps you Mr. w t fer lol hahahaha XD

8 0
2 years ago
Read 2 more answers
The last time period the federal government of these United States ran a budget surplus was ________.
lina2011 [118]
Your answer is a 1998-2001
3 0
2 years ago
Other questions:
  • Small programs called _______ are used to communicate with Paris Friel devices such as monitors printers portable storage device
    9·1 answer
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • Beneficios del reciclaje electrónico
    6·1 answer
  • If you are running a server , which of the follow operating system would be best suited ?window 10 or macOS
    8·1 answer
  • Write a short note on Computer<br>impact on<br> our society?​
    7·2 answers
  • That's my email address​
    14·1 answer
  • What is the output of the following code:
    12·1 answer
  • Paula weeded 40% of her garden in 8 minutes. How many minutes will it take to weed all of her garden at this rate ?
    7·1 answer
  • Many bookstores have closed since the rise of the Internet. What type of
    11·1 answer
  • Which area of government regulations do the Fair Credit and Reporting Act
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!