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
anastassius [24]
3 years ago
8

Create a website for an online movie rental store, using HTML (and any other client technologies) and PHP. The website should in

clude: - A front/home page containing a list of movies available for rent (list at least 8 movies). o Each movie should have a listed rental price. o Note: You can use the same rental price for every movie (i.e., it can be declared as a constant).
Computers and Technology
1 answer:
FromTheMoon [43]3 years ago
7 0

Answer:

HTML and PHP code is given below using 10 movie selections

Explanation:

movierentalstore.php:-

<html>

<head>

<title> Online movie rent store </title>

 

</head>

<body bgcolor="blue" alink="white " vlink="white " link="white">

<br>

<hr size="5" color="white">

<center><font face="Monotype corsiva" size="25" color="yellow"> @@ Movies available for rent right now @@ </font></center>

<font face="times new roman" size=6 color="white">

<ol type="1">

<li> Batman $40 * Cast :- Michael Keaton , Jack Nicholson , Kim Basinger / Robert Wuhl *

</li>

<li> Godzilla 2019 $30 * Cast :- Kyle Chandler, Vera Farmiga, Millie Bobby Brown * </li>

<li> Wonder Woman $50</li>

<li> Terminator $10</li>

<li> Avengers : End Game $20</li>

<li> Harry Potter $30</li>

<li> Annabelle $20</li>

<li> hustlers $10</li>

<li> Joker $50</li>

<li> The Lion king $15</li>

 

</ol>

</font>

<a href="renting.php" alink="white"> Click here to rent the movie ... </a>

<br>

<a href="review.php" alink="white"> Click here to review the movie ... </a>

</body>

</html>

review.php :-

<html>

<head>

<title> Reviewing Page </title>

</head>

<body bgcolor="green" > <hr size="5" color="white">

 

<h1><center><font face="Monotype corsiva" size="25" color="yellow"> Review movie </center></font> </h1> <hr size="5" color="white">

<font size="6" face="times new roman" color="yellow">

<form method="GET">

<label>Select movie</label>

<select name="movie1">

<option value="1" > batman</option>

<option value="2" > godzilla</option>

<option value="3" > wonder woman </option>

<option value="4" > terminator</option>

<option value="5" > avengers</option>

<option value="6" > Harry potter</option>

<option value="7" > Anabelle</option>

<option value="8" > Hustlers</option>

<option value="9" > Joker</option>

<option value="10" > The lion king</option>

<br>

</select>

<br><br>

Username :- <input type="text" name="name1" required="" > </input>

<br><br>

Review :- <input type="text" name="review" required="" > </input>

<br><br>

<label>Select rating</label>

<select name="rating">

<option value="1" > 1</option>

<option value="2" > 2</option>

<option value="3" > 3 </option>

<option value="4" > 4</option>

<option value="5" > 5</option>

<br>

 

</select>

 

<input type="submit" name="submit" required="" value="Submit">

<input type="reset" name="reset" required="" value="Reset">

<hr size="5" color="white">

 

 

</form>

<?php

if(isset($_GET["submit"]))

{ $name1=$_GET["name1"];

$r=$_GET["review"];

$re=$_GET["rating"];

$m=$_GET["movie1"];

echo "Movie name :- ".$m." <br>";

echo "Username :- ".$name1." <br>";

echo "Review :- ".$r." <br>";

echo "Rating :- ".$re. "Stars "." <br>" ;

echo "Successfully submitted.. Thankks for your feedback " ;

}

 

?>

</div>

</body>

</html>

rating,php

<html>

<head>

<title> Renting Page </title>

</head>

<body bgcolor="red"> <hr size="5" color="white">

<h1><center><font face="Monotype corsiva" size="25" color="yellow"> Renting movie </center></font> </h1> <hr size="5" color="white">

<form method="GET">

 

<label>Select movie</label>

<select name="movie1">

<option value="1" > batman</option>

<option value="2" > godzilla</option>

<option value="3" > wonder woman </option>

<option value="4" > terminator</option>

<option value="5" > avengers</option>

<option value="6" > Harry potter</option>

<option value="7" > Anabelle</option>

<option value="8" > Hustlers</option>

<option value="9" > Joker</option>

<option value="10" > The lion king</option>

</select>

 

<input type="submit" name="submit" required="" value="Submit">

<input type="reset" name="reset" required="" value="Reset">

<hr size="5" color="white">

 

 

</form>

</div>

<div class="php">

<?php

if(isset($_GET["submit"]))

{ $movie1=$_GET["movie1"];

echo "Selected movie is : ".$movie1;

echo "<br> </br>";

echo "Amount charged : " ;

switch($movie1)

{

case 1 : echo " 42 dollars" ;

break;

case 2: echo "31.5 dollars" ;

break;

case 3 : echo "52.5 dollars" ;

break;

case 4: echo " 10.5 dollars" ;

break;

case 5 : echo " 21 dollars" ;

break;

case 6 : echo "31.5 dollars" ;

break;

case 7: echo "21 dollars" ;

break;

case 8 : echo " 10.5 dollars" ;

break;

case 9: echo " 52.5 dollars" ;

break;

case 10 : echo " 16 dollars" ;

break;

}

echo "Successfully rented" ;

}

 

?>

</div>

</body>

</html>

You might be interested in
Edhesive coding practice 3.4​
allsm [11]

I'm sorry i have to go to sleep.. Can we continue tm?

In the morning

8 0
4 years ago
Read 2 more answers
Describe how sharing and collaborating a spreadsheet can help the author of the spreadsheet.
Reika [66]
It can help ensure that everything is correct. Having an extra set of eyes can never hurt :)
3 0
3 years ago
What is the most popular social networking service to date?
Fofino [41]
I think Face book hope that helped XD
6 0
3 years ago
Read 2 more answers
Program kalkulator menggunakan bahasa pascal dan pake dua statemen
Hunter-Best [27]
What language is this???  Could you ask in English?
4 0
3 years ago
A palindrome is a string of characters that is the same when reversed (e.g., ‘affa’). Single characters are palindromes. Suppose
Nina [5.8K]

Answer:

Check the explanation

Explanation:

a) This done can be executed through the use of brute force by the given algorithm: Consider any two indices i and j then we can check if string from s[i....j] is palindrome or not in O(L) where L is length of string.

Algorithm to check if string is palindrome :

Takes String s as argument and the two indices i,j between which the string is to be considered

bool palindromeCheck(s,i,j) :

        y = j

        for x in range(i,j) :

             if(s[x]==s[y]) :

                      y--

                      continue

            else :

                      return false

       return true

Now taking a look at the  part a) we will be calling the function to confirm and execute palindrome for all i<=j that is a total of points of the order of O(n^2) and the string checking will take O(n) in the worst case making it O(n^3).

b) To advance over we became aware of the fact that repeated calculation is being done i.e when we confirmed the string s[i...j] we also tested in between strings like s[i+1,j-1] etc in the same time. Consequently we used memorization to store the outcome that we calculate and reuse them we need them later.

We know that P[i][i] will always be one since a single character string will always be a palindrome.

Using this as our base case to check for P[i][j] we need to check if the ith and the jth character are equal and also if P[i+1][j-1] is true i.e is a palindrome.

We come up with the following recurrence

P[i][j] = 1 if i=j

P[i][j] = P[i+1][j-1] ; if i>=j and s[i]==s[j]

            0; otherwise

There are order of O(n^2) states and each one of the state necessitates only constant and regular time character checking for its evaluation and then assigning the value of 1, P[i+1][j-1],0 as a result of that which is again a constant time operation. Therefore all the P[][] matrix values can be found in O(n^2) time.

Pseudo code :

Let n be the length of the string

for x in range(1,n) :

        P[x][x]=1

for sz in range(2,n) : # Since we have already computed answer for string of size 1

        for x in range (1,n-sz+1):

                   y=x+sz - 1

                   if x == y :

                            if sz==2 :

                                      P[x][y] = 1

                            else :

                                      P[x][y] = P[x+1][y-1]

                  else :

                            P[x][y] = 0

From the implementation also it is clear that the running time of the algorithm is O(n^2).

5 0
3 years ago
Other questions:
  • In which career field, would the Computing Technology Industry Association's CompTIA A+ certification be useful?
    13·1 answer
  • What is 1 and 3/4 in grams?
    13·2 answers
  • At what point in a vulnerability assessment would an attack tree be utilized?
    9·1 answer
  • Which phrases/sentence correctly describe the use of bitmap images?
    8·1 answer
  • The formula =B2/A2 is inserted into cell C2. Which of the following is true when this formula is copied and pasted into cell C3?
    6·1 answer
  • Organizational Units are typically configured to: prevent companies from sharing resources. ensure that the system password is t
    13·1 answer
  • What is the exclusive legal right granted to all authors and artists that gives them sole ownership of their work to print, publ
    5·2 answers
  • Identifying the Property for Setting Page Breaks
    8·1 answer
  • Different between embedded computer &amp;<br> Micro controllers
    8·1 answer
  • Assume that the Vehicle class contains a virtual method named CalculateMaxSpeed(). Assume that both the MotorVehicle and Automob
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!