Welcome Guest, Not a member yet? Register   Sign In
update record
#1

[eluser]SamoualSys[/eluser]
i have bulid model to search for record in database and show it in view after that i need to update one record in that database lets say that i have first view page in put name student_id
we search for student_id after we found the student information
we need to update the email of the student how can i pass the id varibale to another controler or model from the view this code from my view

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html&gt;
&lt;meta http-equiv="content-type" content="text/html; charset=UTF-8" /&gt;
&lt;link rel="stylesheet" type="text/css" href="&lt;?= base_url();?&gt;css/bank.css" media="screen" /&gt;
  &lt;head&gt;
    &lt;title&gt;bank studen payment&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    <h1>bank sys</h1>
    <div id="logo"></div>
    <a href="logout">logout</a>
    <div id="content">
    
     <div id="right">
     <h2>&lt;?= $title;?&gt;</h2>
    <p>&lt;?= $search_results;// it show the values from the search model and it have the student_id  ?&gt;</p>
    <div id="test_form">
    &lt;? echo form_open('payment');  ?&gt;
    <label for="pay">payment</label>
      &lt;input type="text" size="20" id="payment_amount" name="payment_amount"/&gt;
      &lt;input type="submit" value="pay"/&gt;
      &lt;? echo form_close();  ?&gt;
   &lt;? echo form_open('account');  ?&gt;
    <label for="account">from accountt number </label>
      &lt;input type="text" size="20" id="account_number" name="account_number"/&gt;
      <label for="payment_account">debit from account number</label>
      &lt;input type="text" size="20" id="payment_amount" name="payment_amount"/&gt;
      &lt;input type="submit" value="from account number "/&gt;
      &lt;? echo form_close();  ?&gt;
  </div>
</div>
    </div>
  &lt;/body&gt;
&lt;/html&gt;




Theme © iAndrew 2016 - Forum software by © MyBB