Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($_SERVER['REQUEST_METHOD'] === 'POST') {
- // send with $_POST['action'] a variable called ID
- if ($_POST['action'] === 'delete'){
- delete record where id= $_POST['id'];
- }
- if ($_POST['action'] === 'create'){
- create record with $_POST['fields'];
- }
- if ($_POST['action'] === 'update'){
- update record where id= $_POST['id'];
- }
- if ($_POST['action'] === 'read'){
- select record where id= $_POST['id'];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment