Question: How do I create HTML forms for the below code; -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation
How do I create HTML forms for the below code;
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 26, 2021 at 01:32 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */;
-- -- Database: `photosite` --
-- --------------------------------------------------------
-- -- Table structure for table `albums` --
CREATE TABLE `albums` ( `albumId` int(11) NOT NULL, `userId` int(11) NOT NULL, `title` tinytext NOT NULL, `description` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
-- -- Table structure for table `comment` --
CREATE TABLE `comment` ( `commentId` int(11) NOT NULL, `userId` int(11) NOT NULL, `sectionId` int(11) NOT NULL, `content` mediumtext NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
-- -- Table structure for table `commentsection` --
CREATE TABLE `commentsection` ( `sectionId` int(11) NOT NULL, `pictureId` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
-- -- Table structure for table `picture` --
CREATE TABLE `picture` ( `pictureId` int(11) NOT NULL, `pictureTitle` text NOT NULL, `pictureDescription` text NOT NULL, `pictureDirectory` text NOT NULL, `albumId` int(11) NOT NULL, `userId` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
-- -- Table structure for table `user` --
CREATE TABLE `user` ( `userId` int(11) NOT NULL, `username` tinytext NOT NULL, `email` tinytext NOT NULL, `permissions` tinyint(1) NOT NULL, `adminRights` tinyint(1) NOT NULL, `password` tinytext NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- -- Indexes for dumped tables --
-- -- Indexes for table `albums` -- ALTER TABLE `albums` ADD PRIMARY KEY (`albumId`), ADD KEY `userId` (`userId`);
-- -- Indexes for table `comment` -- ALTER TABLE `comment` ADD PRIMARY KEY (`commentId`), ADD KEY `sectionId` (`sectionId`), ADD KEY `userId` (`userId`);
-- -- Indexes for table `commentsection` -- ALTER TABLE `commentsection` ADD PRIMARY KEY (`sectionId`), ADD KEY `pictureId` (`pictureId`);
-- -- Indexes for table `picture` -- ALTER TABLE `picture` ADD PRIMARY KEY (`pictureId`), ADD KEY `albumId` (`albumId`), ADD KEY `userId` (`userId`);
-- -- Indexes for table `user` -- ALTER TABLE `user` ADD PRIMARY KEY (`userId`);
-- -- AUTO_INCREMENT for dumped tables --
-- -- AUTO_INCREMENT for table `albums` -- ALTER TABLE `albums` MODIFY `albumId` int(11) NOT NULL AUTO_INCREMENT;
-- -- AUTO_INCREMENT for table `comment` -- ALTER TABLE `comment` MODIFY `commentId` int(11) NOT NULL AUTO_INCREMENT;
-- -- AUTO_INCREMENT for table `commentsection` -- ALTER TABLE `commentsection` MODIFY `sectionId` int(11) NOT NULL AUTO_INCREMENT;
-- -- AUTO_INCREMENT for table `picture` -- ALTER TABLE `picture` MODIFY `pictureId` int(11) NOT NULL AUTO_INCREMENT;
-- -- Constraints for dumped tables --
-- -- Constraints for table `albums` -- ALTER TABLE `albums` ADD CONSTRAINT `albums_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);
-- -- Constraints for table `comment` -- ALTER TABLE `comment` ADD CONSTRAINT `comment_ibfk_1` FOREIGN KEY (`sectionId`) REFERENCES `commentsection` (`sectionId`), ADD CONSTRAINT `comment_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`);
-- -- Constraints for table `commentsection` -- ALTER TABLE `commentsection` ADD CONSTRAINT `commentsection_ibfk_1` FOREIGN KEY (`pictureId`) REFERENCES `picture` (`pictureId`);
-- -- Constraints for table `picture` -- ALTER TABLE `picture` ADD CONSTRAINT `picture_ibfk_1` FOREIGN KEY (`albumId`) REFERENCES `albums` (`albumId`), ADD CONSTRAINT `picture_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `user` (`userId`); COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
