Welcome Guest, Not a member yet? Register   Sign In
How to upload image in codeigniter 4
#4

(11-05-2019, 05:56 PM)donpwinston Wrote: I think this is messed up:
url        : '<?=site_url( 'public/home/add_user' );?>',

doc root is 'public'. url should be '/home/add_user' where Home is the controller class. You don't need the site_url() function.

remove the second var:
var form_data    = user_data.serialize();
      form_data    = form_data + '&<?php echo csrf_token(); ?>:<?php echo csrf_hash(); ?>&id=' + id;
make use of the error property of the ajax call to make it easier to see what's going on.
(why use ajax?)



Thank you .it worked
Reply


Messages In This Thread
RE: How to upload image in codeigniter 4 - by durairaj - 11-05-2019, 10:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB