Commit 1365e5bf authored by rama chandra's avatar rama chandra

updated

parent c0a7a8c9
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 25, 2019 at 11:25 AM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.19-0ubuntu0.18.04.2
-- Host: 127.0.0.1
-- Generation Time: Nov 08, 2019 at 06:58 AM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
......@@ -22,6 +24,31 @@ SET time_zone = "+00:00";
-- --------------------------------------------------------
--
-- Table structure for table `admins`
--
CREATE TABLE `admins` (
`id` int(11) NOT NULL,
`username` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`contactno` varchar(50) NOT NULL,
`clgid` int(50) NOT NULL,
`region` varchar(100) NOT NULL,
`clg` varchar(100) NOT NULL,
`state` varchar(100) NOT NULL,
`password` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `admins`
--
INSERT INTO `admins` (`id`, `username`, `email`, `contactno`, `clgid`, `region`, `clg`, `state`, `password`) VALUES
(1, 'ajay', 'ajaygurumadu@gmail.com', '9553917914', 160040499, 'vijayawada', 'kl university', 'ap', 'ajay@123');
-- --------------------------------------------------------
--
-- Table structure for table `bloo`
--
......@@ -33,51 +60,91 @@ CREATE TABLE `bloo` (
`age` int(100) NOT NULL,
`mobile` varchar(100) NOT NULL,
`city` varchar(100) NOT NULL,
`dd` int(20) NOT NULL
`dd` int(20) NOT NULL,
`last_donated` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bloo`
--
INSERT INTO `bloo` (`id`, `uname`, `blood`, `age`, `mobile`, `city`, `dd`) VALUES
(2, 'surya', 'O-', 21, '7382647997', 'vijayawada', 3),
(3, 'rama chandra', 'B+', 21, '9293325828', 'vijayawada', 3),
(4, 'Ajay', 'A+', 21, '9553917914', 'vijayawada', 3),
(5, 'Lalith', 'B+', 20, '9542455936', 'Tadepalli', 0),
(6, 'Saijagadeesh', 'AB+', 20, '8466049961', 'Guntur', 3),
(7, 'dheeraj', 'AB+', 20, '7075953294', 'guntur', 0),
(9, 'Mahesh Babu', 'O+', 21, '08919008867', 'Guntur', 18),
(10, 'jasmine', 'O+', 25, '6302933566', 'vijayawada', 3),
(11, 'Manasa', 'A+', 20, '7661024280', 'Mumbai', 2),
(12, 'jethin ', 'O+', 20, '7013954033', 'nizambad', 7),
(13, 'Pavan', 'B+', 20, '6302856582', 'Vijayawada', 3),
(14, 'Ajay Tripuramallu', 'B+', 21, '7731939677', 'Guntur', 3),
(15, 'satya', 'O-', 21, '7382647997', 'vijayawada', 3),
(16, 'jvhvjvj', 'O-', 21, '4658645', 'wrvwrvr', 3),
(17, 'jbbhjvghvhbj', 'O-', 21, '4974512', 'ghjnk', 3),
(18, 'Rama Chandra', 'B+', 19, '9293325828', 'Tadepalli', 1),
(19, 'venkat', 'O-', 21, '7382647997', 'vijayawada', 3);
INSERT INTO `bloo` (`id`, `uname`, `blood`, `age`, `mobile`, `city`, `dd`, `last_donated`) VALUES
(2, 'surya', 'O-', 21, '7382647997', 'vijayawada', 3, NULL),
(4, 'Ajay', 'A+', 21, '9553917914', 'vijayawada', 3, NULL),
(5, 'Lalith', 'B+', 20, '9542455936', 'Tadepalli', 0, NULL),
(6, 'Saijagadeesh', 'AB+', 20, '8466049961', 'Guntur', 3, NULL),
(7, 'dheeraj', 'AB+', 20, '7075953294', 'guntur', 0, NULL),
(9, 'Mahesh Babu', 'O+', 21, '08919008867', 'Guntur', 18, NULL),
(10, 'jasmine', 'O+', 25, '6302933566', 'vijayawada', 3, NULL),
(11, 'Manasa', 'A+', 20, '7661024280', 'Mumbai', 2, NULL),
(12, 'jethin ', 'O+', 20, '7013954033', 'nizambad', 7, NULL),
(13, 'Pavan', 'B+', 20, '6302856582', 'Vijayawada', 3, NULL),
(14, 'Ajay Tripuramallu', 'B+', 21, '7731939677', 'Guntur', 3, NULL),
(15, 'satya', 'O-', 21, '7382647997', 'vijayawada', 3, NULL),
(21, 'rama chandra', 'B+', 21, '9293325828', 'Vijayawada', 0, NULL),
(22, 'rama chandra', 'B+', 21, '09293325828', 'Tadepalli', 0, NULL),
(23, '', '', 0, '', '', 0, NULL);
-- --------------------------------------------------------
--
-- Table structure for table `donations`
--
CREATE TABLE `donations` (
`id` int(50) NOT NULL,
`Rname` text NOT NULL,
`blood1` text NOT NULL,
`Dname` text NOT NULL,
`ddate` date NOT NULL,
`Hname` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `admins`
--
ALTER TABLE `admins`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bloo`
--
ALTER TABLE `bloo`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `donations`
--
ALTER TABLE `donations`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `admins`
--
ALTER TABLE `admins`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bloo`
--
ALTER TABLE `bloo`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
--
-- AUTO_INCREMENT for table `donations`
--
ALTER TABLE `donations`
MODIFY `id` int(50) NOT NULL AUTO_INCREMENT;
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 */;
......@@ -30,7 +30,7 @@ $dd =$_REQUEST['dd'];
$mobile=$_REQUEST['mobile'];
$city=$_REQUEST['city'];
$update="update bloo set uname='".$uname."', blood='".$blood."', age='".$age."', dd='".$dd."',mobile='".$mobile."',city='".$city."' where id='".$id."'";
$update="update bloo set uname='".$uname."', blood='".$blood."', age='".$age."', dd='".$dd."',mobile='".$mobile."',city='".$city."', ldonated='".$ldonated."' where id='".$id."'";
$result1= mysqli_query($con, $update) or die ( mysqli_error());
$status = "Record Updated Successfully. </br></br><a href='view.php'>View Updated Record</a>";
echo '<p style="color:#FF0000;">'.$status.'</p>';
......@@ -46,6 +46,7 @@ echo '<p style="color:#FF0000;">'.$status.'</p>';
<p><input type="text" name="dd" placeholder="Enter Last donated" required value="<?php echo $row['dd'];?>" /></p>
<p><input type="text" name="mobile" placeholder="Enter Mobile No" required value="<?php echo $row['mobile'];?>" /></p>
<p><input type="text" name="city" placeholder="Enter City" required value="<?php echo $row['city'];?>" /></p>
<p><input type="text" name="ldonated" placeholder="Last donated date" required value="<?php echo $row['ldonated'];?>" /></p>
<p><input name="submit" type="submit" value="Update" /></p>
</form>
<?php } ?>
......
......@@ -20,7 +20,7 @@ $row = mysqli_fetch_assoc($result);
<h2>View Records</h2>
<table width="100%" border="1" style="border-collapse:collapse;">
<thead>
<tr><th><strong>S.No</strong></th><th><strong>Name</strong></th><th><strong>Blood Group</strong></th><th><strong>Age</strong></th><th><strong>Last donated</strong></th><th><strong>Mobile No</strong></th><th><strong>City</strong></th><th><strong>Edit</strong></th><th><strong>Delete</strong></th></tr>
<tr><th><strong>S.No</strong></th><th><strong>Name</strong></th><th><strong>Blood Group</strong></th><th><strong>Age</strong></th><th><strong>Last donated before months</strong></th><th><strong>Mobile No</strong></th><th><strong>City</strong></th><th><strong>Last donated</strong></th><th><strong>Edit</strong></th><th><strong>Delete</strong></th></tr>
</thead>
<tbody>
<?php
......@@ -28,7 +28,7 @@ $count=1;
$sel_query="Select * from bloo ORDER BY id desc;";
$result = mysqli_query($con,$sel_query);
while($row = mysqli_fetch_assoc($result)) { ?>
<tr><td align="center"><?php echo $count; ?></td><td align="center"><?php echo $row["uname"]; ?></td><td align="center"><?php echo $row["blood"]; ?></td><td align="center"><?php echo $row["age"]; ?></td><td align="center"><?php echo $row["dd"]; ?></td><td align="center"><?php echo $row["mobile"]; ?></td><td align="center"><?php echo $row["city"]; ?></td><td align="center"><a href="edit.php?id=<?php echo $row["id"]; ?>">Edit</a></td><td align="center"><a href="delete.php?id=<?php echo $row["id"]; ?>">Delete</a></td></tr>
<tr><td align="center"><?php echo $count; ?></td><td align="center"><?php echo $row["uname"]; ?></td><td align="center"><?php echo $row["blood"]; ?></td><td align="center"><?php echo $row["age"]; ?></td><td align="center"><?php echo $row["dd"]; ?></td><td align="center"><?php echo $row["mobile"]; ?></td><td align="center"><?php echo $row["city"]; ?></td><td align="center"><?php echo $row["ldonated"]; ?></td><td align="center"><a href="edit.php?id=<?php echo $row["id"]; ?>">Edit</a></td><td align="center"><a href="delete.php?id=<?php echo $row["id"]; ?>">Delete</a></td></tr>
<?php $count++; } ?>
</tbody>
</table>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment