Can somebody explain to me how can I create a one page for all crud and my edit for to be the same with my create form? I don't know how to use if(iseet($_POST['action=create']) if(iseet($_POST['action=edit']) if(iseet($_POST['action=delete']) Oh and if someone is intrested in accepting an apprentice to teach and review code. I would be glad. I mainly worked with wordpress or frameworks so some basics of php i have missed Thank you

Member Avatar
Member Avatar
+0 forum 5

Hi all, I am putting together a CRUD. I have read through tutorials, and references. Just wanted to see if i was on the right track: <?php // root -> /classLib/CRUD/CRUD spl_autoload_extensions(".php"); spl_autoload_register(); use classLib\database\database_Connection as DB; class CRUD { private $id; #__construct to be extended public function __construct($id=null){ $this->id = $id; #__construct to be extended } public function save() { try{ $sql = ""; $q = DB::get()->prepare($sql); $q->execute(array()); } catch (Exception $e){ print "Error: " . $e->getMeasage(); } } public function update() { } public function delete() { try{ $sql = "DELETE FROM [table to be clarified] WHERE id=:id"; …

Member Avatar
Member Avatar
+0 forum 5

The End.