Blog |
models/blog_model.php
PHP Code: public function insert_blog() Hello, I am learning how to create blog but I do not understand the code: PHP Code: $this->title = $_POST['title']; // please read the below note $_POST['title']; where does $_POST ['title'] comes from ? why using $_POST? Is it taken from view/ inputting entry of title or content ? Thanks in advance.
" If I looks more intelligence please increase my reputation."
Every single one of your threads is asking PHP-101 questions, showing that you have absolutely no idea what you are doing. Please learn basic PHP first.
I want to give you the suggestion to take lesson from w3schools. They have mention every single parts of PHP part by part. You will learn basic PHP from there.
Yes, I have learn php for 3 years. but CI for only several months. I know where to use $_POST in php context. But when you move it to CI I start to doubt it.
Usually is for forms. Is this the same way? Can you take forms in views/blog_view.php and input it in models/blog_model.php ? Thanks.
" If I looks more intelligence please increase my reputation."
DON'T take lessons from w3schools.
Use something like Codecademy (https://www.codecademy.com/learn/php). |
Welcome Guest, Not a member yet? Register Sign In |