Skip to content

Laravel: Display data in DropDown from database

I was developing a project with Laravel and want to use dropdownlist and populate it with data from database please help. Here is the code that I use: Controller: public function create() { $…

uploading docx file in codeigniter

mimes.php var_dump is giving following response This is my some controller code ‘Please I tried all the possible solution available but not able to succeed.Please suggest. Answer I missed docx in controller and adding ‘application/octet-stream’ in docx mimes is solving problem.Thanks for you…

Ajax POST Success But No Data Are Send

I have problem to upload multi file using ajax, in this case im using codeingiter, when I call $_POST array return null on upload function, this is my my form I’m using this snippets Form https://jsfiddle.net/alexjamesbrown/2nzL9f7g/ Server Test Return My question is how to fix this ? Thanks in advance …

Send PHP Error if No Rows Created

I’m trying to prevent duplicate rows from being created. My current statement works, meaning it prevents duplicates from being created, but it always returns the execution as a success, meaning I don’t get an “error” message if no rows were created. Thanks I would like to fail the sql …

Create custom function for upload and insert data

Is there any chance that I can create a custom function for upload? I have 2 function which are insert_content() and insert_officials. In that function there is a code for uploading image. How will I do that since they have the same code of config. Answer Just make a function and put it in a model or somethin…