-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 22, 2019 at 03:40 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; 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: `bdname` -- -- -------------------------------------------------------- -- -- Table structure for table `table_refresh` -- CREATE TABLE `table_refresh` ( `uniqueid` int(11) NOT NULL, `firstname` text NOT NULL, `surname` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `table_refresh` -- INSERT INTO `table_refresh` (`uniqueid`, `firstname`, `surname`) VALUES (31, 'test', 'test2'); -- -- Indexes for dumped tables -- -- -- Indexes for table `table_refresh` -- ALTER TABLE `table_refresh` ADD PRIMARY KEY (`uniqueid`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `table_refresh` -- ALTER TABLE `table_refresh` MODIFY `uniqueid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32; 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 */;
Insert.php
PHP Crud sample
Edit.php
query($sql); $row = mysqli_fetch_array($result); ?>PHP Crud sample
Delete.php
query($sql); ?> add new data
# | Name | Action | |
edit delete |
Data.php
query($sql); if(!$result) { echo "Failed to insert record"; } else { echo "Record inserted successfully"; } } else{ $id=$_POST['id']; $sql = " Update table_refresh SET firstname = '$name', surname = '$surname' where uniqueid=$id"; $result = $conn->query($sql); } } ?> add new data
# | Name | Action | |
edit delete |
Posting Komentar