How to insert corporate details into database |
(11-18-2020, 07:48 AM)InsiteFX Wrote: My fault, in your model you gave it an alias name which had a lower case first letter try this now. Yes, that fixed it. But I cant see where I used lower case first letter. The rules are that models must have upper case first letter. Now I know how to insert into a database, I should be able to resolve my other problem of uploading photos & fwrite data for an advert. If I upload the photos first & insert $product into a temp field of a database table then redirect (that Im still working on) to the data upload and recover the $product name by; PHP Code: $product = $this->session->userdata('temp_1'); But then I will need to delete the contents of that field probably best when it redirects to the finished advert. Do you know how to delete the contents? Im jumping the gun here a little coz I should be searching before I ask questions. I hope you dont mind. UPDATE I think I can answer my question as follows. Just correct me if they are wrong. These go into a model; PHP Code: public function insert_product($product) And these go into the appropriate Controllers; PHP Code: $this->members_model->insert_product($product); |
Welcome Guest, Not a member yet? Register Sign In |