[eluser]beasten[/eluser]
Hi all,
Im new here and at CodeIgniter. Im doin a little project and ran into som problems. Donno if this question is OK with you, it contains a little bit of jQuery too.
I have a jQuery list (not really important if its jQ or not..) with "expenses", when I click one of my expenses theres a little dropdown-form (jQuery) with the values of my expense. (Its an economy project)
My question is how do I get the value from my expense to be filled in to my form so that I can edit the expense? Ive tried the urisegment, tho I dont get it to work. Code Below.
Thank you, Beasten
Code:
<div id="top10">
<ul>
<?
$this->load->database();
$user_id = $this->session->userdata('USERID');
$query = mysql_query("SELECT * FROM EXPENSES WHERE USERID = $user_id ORDER BY DATE DESC LIMIT 10");
while ($result = mysql_fetch_array($query)) {
echo ("<li><a href='$result[0]/#editField'>$result[2]
$result[3],-</a></li>");
}
?>
</ul>
</div>
<div id="editField">
<form>
<input name="edit" type="text" value="<? echo $this->uri->segment(4); ?>">
<input type="submit" value="Change">
</form>
</div>