100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary ict3612 assignment3 $22.08
Add to cart

Summary

Summary ict3612 assignment3

 46 views  1 purchase
  • Course
  • Institution

ict3612 assignment3 php code , please not you need to create your db and website on webhost by yourself , unfortunately i cannot do so

Preview 2 out of 11  pages

  • July 30, 2023
  • 11
  • 2022/2023
  • Summary
avatar-seller
Assignment 3 ict3612


Disclaimer: Responsibilities for Code Integration

Before using the provided PHP code to connect to your database, please note that you are responsible
for:
Matching the code to your specific database configuration.
Creating a database with actual data using phpMyAdmin or another tool.
Ensure you understand PHP and MySQL basics, and back up your database before making any
changes. Test and debug the integration as needed. Disclaimer: Responsibilities for Code Integration

Before using the provided PHP code to connect to your database, please note that you are responsible
for:
Matching the code to your specific database configuration.
Creating a database with actual data using phpMyAdmin or another tool.
Ensure you understand PHP and MySQL basics, and back up your database before making any
changes. Test and debug the integration as needed.




Task 1: Chapter 16: page name=task1.php

Table of thespians:

Contains: Details about the performers involved in cinematic productions.
Main Identifier: ActorID (a distinctive marker for each actor).
Movie Player Roles Table:

Depicts: The character portrayals enacted by actors in specific movies.
Main Identifier: FilmActorRoleID (a unique label for each film actor role).
Referring Identifiers: ActorID (linked to the Thespians table to identify the actor), FilmTitleID (connected
to the Film Titles table to recognize the movie title), RoleTypeID (linked to the Role Categories table to
distinguish the role type).
Film Titles Log:

Captures: Data concerning individual motion pictures.
Main Identifier: FilmTitleID (an exclusive mark for each film title).
Role Categories Archive:

Encompasses: Various classifications of roles actors can undertake in movies.
Main Identifier: RoleTypeID (an individualized code for each role category).

, To summarize the interrelationships among the tables:

Thespians Table (1) to (N) Movie Player Roles Table: An actor can undertake numerous movie roles.
Role Categories Table (1) to (N) Movie Player Roles Table: A role category can be associated with
multiple movie player roles.
Movie Player Roles Table (N) to (1) Film Titles Log: Several movie player roles can be linked to a single
film title.



Task 2: Chapter 16, 17, 18, 19: page name=task2.php


<?php

// database credentials
$host = 'localhost';
$username = ''; //place you username
$password = '';//password
$database = '';//database name

// Connect to the database
$conn = mysqli_connect($host, $username, $password, $database);

// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}

// Fetch data from all five tables
$tables = ['users', 'products', 'orders', 'categories', 'product_categories'];
$tableData = [];

foreach ($tables as $table) {
$query = "SELECT * FROM $table";
$result = mysqli_query($conn, $query);
$tableData[$table] = mysqli_fetch_all($result, MYSQLI_ASSOC);
}

// Display data in HTML tables
echo '<h1>Database Tables</h1>';
foreach ($tableData as $tableName => $data) {
echo "<h2>$tableName Table</h2>";
echo '<table border="1">';
echo '<tr>';
foreach ($data[0] as $column => $value) {
echo "<th>$column</th>";

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller phegelelo. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $22.08. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

52355 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$22.08  1x  sold
  • (0)
Add to cart
Added