Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please style my database table in html and css. My page code is in php and it fetchs the table which was written in MySQL.

Please style my database table in html and css. My page code is in php and it fetchs the table which was written in MySQL. The PHP code and My SQL table are below..

$user='root'; $pass='password'; $host='localhost'; $db='MyDatabase'; $conn=mysqli_connect ($host,$user,$pass,$db); $result=mysqli_query ($conn,'select * from teams'); while ($mygroup=mysqli_fetch_array($result,MYSQLI_ASSOC)) { print "Group "; print$myteam['Title']; print " led by "; print$mygroup['city']; print " born in "; print$myteam['leader']; print " established in "; print$myteam['year']; echo ". "; } ?>

CREATE TABLE groups ( title varchar(20), city varchar(2), leader varchar(20), year int);

mysql> SELECT * FROM groups; +------------+---------+------------------+------+ | title | city | leader | year | +------------+---------+------------------+------+ | Team F | rome| Maria Bento | 1950 | | Team M | berlin | Tim Walsh | 1954 | | Team A | dublin | Frank Byrne | 1993 | | Team R | amsterdam | Colm Hunt | 2005 | | Team W | london | Sarah Rachel | 1978 | | Team J | paris | Edward Jims | NULL | +------------+---------+------------------+------+

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions