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
Create a function average_temp(s) that accepts a file name s that contains temperature readings. Each line in the file contains
Debora [2.8K]

Answer:

def average_temp(s): f = open("s.txt","r") for line in f: myList = line.split(",") print(myList[0],end=",") t=0 for i in range(1,25,1): t += int(myList[i]) t /= 24 print(t) f.close()

def average_temp(s):

f = open("s.txt","r")

for line in f:

myList = line.split(",")

print(myList[0],end=",")

t=0

for i in range(1,25,1):

t += int(myList[i])

t /= 24

print(t)

f.close()

Explanation:

I used Python for the solution.

3 0
3 years ago
What are the characteristics of a severe storm
Ganezh [65]
Vertical wind shear<span> helps storms become well-</span>organized<span> and long- lived; characteristics </span>associated<span> with severe thunderstorms. Vertical </span>wind shear<span> through a deep layer (3-5 miles) separates the </span>updraft<span> and downdraft areas in the storm, and can induce rotation, at times intense, in the storm's mid levels. </span>
7 0
3 years ago
What UDP port is used by a default WDS server setup when it is listening for PXE boot requests​
Vera_Pavlovna [14]
WDS uses Port 4011 to listen to PXE boot requests
8 0
3 years ago
Database administrators must make sure that ________ and ________ techniques and procedures are operating to protect the databas
butalik [34]

Answer:

backup; recovery

Explanation:

Backup and recovery refers to the process of backing up data in case of a loss and setting up systems that allow that data recovery due to data loss. Backing up data requires copying and archiving computer data, so that it is accessible in case of data deletion or corruption. Data from an earlier time may only be recovered if it has been backed up.

Data backup is a form of disaster recovery and should be part of any disaster recovery plan.In some cases, backing up or restoring entire systems, or the enterprise, after an event or disaster can take days

5 0
3 years ago
Write a c program that reprints input so that no line is longer than 50 characters. Specifically, for lines less than or equal t
Alex73 [517]

Using the knowledge in computational language in C++ it is possible to write a code that reprints prints input so that no line is longer than 50 characters.

<h3>Writting the code:</h3>

<em>#include<stdio.h></em>

<em />

<em>int main(int argc, char** argv){</em>

<em>    //creating pointer to read a file</em>

<em>    FILE * fp;</em>

<em>    char * line = NULL;</em>

<em>    size_t len = 0;</em>

<em>    ssize_t read;</em>

<em>    int i=0;</em>

<em>    //opening a file</em>

<em>    fp = fopen(argv[1], "r");</em>

<em>    //handling the error condition</em>

<em>    if (fp == NULL){</em>

<em>        printf("File not found..!!");</em>

<em>        return 0;</em>

<em>    }</em>

<em>    int moreThan50 =0;</em>

<em>    //reading a file line by line</em>

<em>    while ((read = getline(&line, &len, fp)) != -1) {</em>

<em>        i = 0;</em>

<em>        if(read >= 50){</em>

<em>            moreThan50++;</em>

<em>        }</em>

<em>        while(i < read){</em>

<em>            if(line[i]!='\n'){</em>

<em>                if(i%50 == 0){</em>

<em>                    printf("\n%c",line[i]);</em>

<em>                }else{</em>

<em>                    printf("%c",line[i]);</em>

<em>                }</em>

<em>            }</em>

<em>            i++;</em>

<em>        }</em>

<em>    }</em>

<em>    printf("\nTotal lines over 50 chars: %d\n",moreThan50);</em>

<em>    printf("Offending Lines: ");</em>

<em>    for(i=1;i<=moreThan50;i++)</em>

<em>        printf("%d, ",i);</em>

<em>    fclose(fp);</em>

<em>    return 0;</em>

<em>}</em>

See more about C++ at brainly.com/question/19705654

#SPJ1

4 0
1 year ago
Other questions:
  • Assume that
    7·1 answer
  • How can i take out a random (double) number in between 5.0 to 15.0 in c++?
    7·1 answer
  • Im being timed please help!!
    7·2 answers
  • Ecommerce sites sell this to generate income
    11·1 answer
  • 11. Print Layout, Full Screen Reading, Web Layout, Outline and Draft are examples of _______. 12. What do you do if the spelling
    5·1 answer
  • Spoken word and written word are different because what
    9·1 answer
  • Tom's Art Supplies used to sell art supplies through mail order catalogs, but the company's order takers often had difficulty de
    9·1 answer
  • What is the main purpose of a web crawling program
    15·1 answer
  • Why is my internet slow even though the speed test says it is fast
    12·1 answer
  • Which of the following are true about algorithms? (You may select more than one)
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!