[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">
<html>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="<?= base_url();?>css/bank.css" media="screen" />
<head>
<title>bank studen payment</title>
</head>
<body>
<h1>bank sys</h1>
<div id="logo"></div>
<a href="logout">logout</a>
<div id="content">
<div id="right">
<h2><?= $title;?></h2>
<p><?= $search_results;// it show the values from the search model and it have the student_id ?></p>
<div id="test_form">
<? echo form_open('payment'); ?>
<label for="pay">payment</label>
<input type="text" size="20" id="payment_amount" name="payment_amount"/>
<input type="submit" value="pay"/>
<? echo form_close(); ?>
<? echo form_open('account'); ?>
<label for="account">from accountt number </label>
<input type="text" size="20" id="account_number" name="account_number"/>
<label for="payment_account">debit from account number</label>
<input type="text" size="20" id="payment_amount" name="payment_amount"/>
<input type="submit" value="from account number "/>
<? echo form_close(); ?>
</div>
</div>
</div>
</body>
</html>