0

I'm trying to create a web page that when user click on the below link,it will bring user to the next page

<a href="../try/sewcutrptsummary?pro={$row ->idmsul}" target="blank"">Link

My question is,how can i retrieve the same data from 1st page & display it in a textbox in 2nd page as shown in below pictuce?

[https://lh4.googleusercontent.com/RQlM6oloj1sbDm6VUP-kTtG2W28kCf0cW6cPx92zuoijMqTJfaORp2ZsYSsi2qjiY5E5rZe8=w1600-h794-rw]

This is the view for the 2nd page

<div class="control-group">
<label for="proid" class="control-label">MSUL ID</label>
<div class="controls"> 
 <input type="text" id="txtinput" name="txtinput"value="">
<select id="prodtype" name="prodtype"onchange="checknumber();">
<option selected >--Select Product Type--</option>
 <option value="Main"  >Main</option>
 <option value="Sub">Sub</option>
</select>
</div>
<div class="controls" id="after" style="display : none">         
<select id="cutprod" name="cutprod" class="input-xxlarge">
</select>

<input id="generatebtn" type="button" class="btn-primary btn-small" onclick="generateRpt();" value="Generate" ></div>
</div>

and this is the controller for the page

function index() {
        $this -> smarty -> assign("page", "View Cutting Report Summary");
        $this -> smarty -> assign("dataname", "Cutting Report Summary");
        $this -> smarty -> assign("pagename", "sewcutrptsummary");
        $this -> smarty -> assign("msg", "");
        $this -> smarty -> assign("script", "Yes");

        $idmsul = $this -> input -> get_post("pro");
        $query = "Select idmsul from sindi_schedule where idmsul='{$idmsul}' group by idmsul";
        $result = $this -> global_model -> query($query) -> result();
        $data['idmsul'] = $result;

        $this -> smarty -> view('sewcutrptsummary.tpl',$data);
        }

when i try to use print_r($data); to check the data,it display

Array ( [idmsul] => Array ( [0] => stdClass Object ( [idmsul] => JS-F1701060-1L ) ) )

which mean the data is there,but i don't know how to display it in my textbox.

Can anybody assist me on this problem?

Your help is greatly appreciate.

Edited by Reverend Jim: Moved to programming forum

2
Contributors
1
Reply
37
Views
2 Months
Discussion Span
Last Post by cereal
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.