Welcome Guest, Not a member yet? Register   Sign In
help me about CI + Jquery mobile

hello all,

i'm newbie on codeigniter and i build web mobile version with CI(2.0)and jquery mobile 1.0.
my question..
how to upload my image files like jpeg,gif and others on my source code?!

i try with CI without jquery mobile.sucess but with jquery mobile not sucess. why?

this my sourcode.


function save_article()

$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'jpeg|gif|jpg|png';
$config['max_size'] = '10000';
$config['max_width'] = '1024';
$config['max_height'] = '1768';
$field_name = "foto";

if (!$this->upload->do_upload($field_name))
$upload_error = array("error" => $this->upload->display_errors());
//$this->load->view("form_insert_siswa", $upload_error);
$upload_data = $this->upload->data();
$rec_data = array("nmbio" => $this->input->post("namabio"),
"isi" => $this->input->post("article"),
"gbr" => $upload_data["full_path"]);
$this->db->insert("review", $rec_data);


<div data-role="collapsible" data-theme="b" data-content-theme="d">
<h3 id="according_sent_article">Kirim Article Biologi</h3>
<p id="kirim_article">
&lt;?php echo form_open_multipart('mobile/save_article','name="f_article"') ?&gt;

<label for='namabio'>NameBiologi :</label>
&lt;input type='text' name='namabio' id='namabio' value='' /&gt;

<label for='article'>Article :</label>
&lt;textarea name="article" id="article"&gt; &lt;/textarea&gt;

<label for='foto'> Image :</label>
&lt;input type="file" name="foto" id='foto' value=''&gt;

<a class='mybutton' data-role="button">sent Article Biologi</a>


$(document).bind("mobileinit", function(){
$.mobile.loadingMessage = "Mohon tunggu...";


function simpan_article()

var namabio = $('#namabio').val();
if(namabio == '')

my source code like that.help me?

thanks b4 and sory my english not good.

Theme © iAndrew 2016 - Forum software by © MyBB