Updating Using Radio Button - Checkbox and Dropdown List
Submitted by rinvizle on Wednesday, July 13, 2016 - 16:15.
In this tutorial I will you will learn about updates and how to save data in Mysql , display the information from MySQL, and most important How to update radio button, Checkbox and dropdown list in PHP and MySQL.This simple updating using radio button, checkbox and dropdown list in PHP and MySQL. This project creates a registration query through the form and automatically connect in the mysql to create database. And you can update and delete the data even if you are not in the database. I will show you the example code below.
Update - Registration Form
Database Configuration
For more tutorials just visit this website @www.sourcecodester.com and don't forget to Like and Share. Enjoy Coding.
Sample Code
Registration Form- <script type="text/javascript">
- function deletes(id)
- {
- if(confirm('Sure To Remove This Record ?'))
- {
- window.location.href='delete.php?id='+id;
- }
- }
- </script>
- <h1 align="center">Update - Registration Form</h1>
- <?php
- include('config.php');
- {
- if($row)
- {
- echo "<font color='red'>This email id is alredy exists</font>";
- }
- else
- {
- echo "<font color='blue'>Records saved</font>";
- }
- }
- echo "<table border='1'>";
- echo "<tr><th>Student_Id</th><th>Name</th><th>Email</th><th>Mobile Number</th><th>Gender</th><th>Hobbies</th><th>Country</th><th>Registered Date</th><th>Delete</th><th>Update</th></tr>";
- {
- echo "<tr>";
- echo "<td>".$obj->id."</td>";
- echo "<td>".$obj->name."</td>";
- echo "<td>".$obj->email."</td>";
- echo "<td>".$obj->mob."</td>";
- echo "<td>".$obj->gender."</td>";
- echo "<td>".$obj->hobbies."</td>";
- echo "<td>".$obj->country."</td>";
- echo "<td>".$obj->regDate."</td>";
- ?>
- <td><a href="javascript:deletes(<?php echo $obj->id; ?>)">Delete</a></td>
- <?php
- echo "<td><a href='update.php?eid=$obj->email'>Update</a> </td>";
- echo "</tr>";
- }
- echo "</table>";
- ?>
- <?php
- ?>

Add new comment
- 1925 views