Exercise on PHP MySQL
- Create one table with header row with primary class ( boostrap ).
- Add ten rows with alternating background colours ( use bootstrap )
- Using PHP or any other language generate 10 rows of data using loop. ( use for loop in PHP )
- Check that each row of data shows one serial number and this number is incremented within the loop.
Using PHP MySQL database.
- Using the above concepts , try to collect ten records from student table and display one record in one row. Each row should have alternate background colour ( bootstrap table class table-striped ) .
- Add link to student name and onclick of the link, one page will open and it will allow you to update the mark obtained by student. Use the student id in GET method to pass the unique id to edit page.
- Add a link for each record to delete the record from the table. It will ask for confirmation message before deleting the record.
- Create a page to add a new student record to table. ( use four input fields to add name, class, mark and sex )
- Change the class field to dropdown list to select the class.
- Change the sex field to radio button to select Male or Female.
- Add all validation at backend to show error message if any input is wrong.
Back to PHP MySQL
Subscribe to our YouTube Channel here
This article is written by plus2net.com team.