1. I'd like to create one controller to add or edit article and load only one view (empty form or populated form)
The code I've attached works and it's close to what I want but it has two different views with the same form and two controllers for add and edit data.
2. What happens when user sends the form? Let's say we have field with name="username" value="some_value"
How can I retrieve some_value in view file? Is it a variable or an array?
Can you help please?
Article.php (Size: 2.8 KB / Downloads: 1)
Article_model.php (Size: 1.12 KB / Downloads: 1)
add.php (Size: 555 bytes / Downloads: 2)
edit.php (Size: 917 bytes / Downloads: 2)
index.php (Size: 510 bytes / Downloads: 1)
The code I've attached works and it's close to what I want but it has two different views with the same form and two controllers for add and edit data.
2. What happens when user sends the form? Let's say we have field with name="username" value="some_value"
How can I retrieve some_value in view file? Is it a variable or an array?
Can you help please?
Article.php (Size: 2.8 KB / Downloads: 1)
Article_model.php (Size: 1.12 KB / Downloads: 1)
add.php (Size: 555 bytes / Downloads: 2)
edit.php (Size: 917 bytes / Downloads: 2)
index.php (Size: 510 bytes / Downloads: 1)