[英]single anchor tag when click on button redirect with first id as seen in url and second as hidden
This is search.php view code: 这是search.php查看代码:
<p class="center-align">
<a class="waves-effect waves-light btn modal-trigger hoverable" href="<?php echo base_url();?>broucher_request/<?php
echo $res->collg_id ?>/<?php
$res->pdf_name ?>">
<i class="material-icons left">arrow_downward</i>Brochure</a>
<!-- <a class="waves-effect waves-light btn orange modal-trigger" href="#modal1">Modal</a>-->
</p>
This is brochure_request.php 这是小册子_request.php
<div class="input-field col s12">
<i class="material-icons prefix">pdf</i>
<input id="icon_prefix active" type="text" name="pdf_id">
<label for="icon_prefix">pdf Name</label>
<div class="white-text center"></div>
</div>
This is controller 这是控制器
public function broucher_request($id)
{
$data['college_id'] = $id;
$this->load->view('home/brochure_request',$data);
}
i have a anchor tag where im trying to send collg_id of search.php and it is redirect me to brochure_request page and now i trying to send one more pdf_name after collg_id like this http://localhost/aplus/broucher_request/44/hello.pdf but in url hello.pdf should be hidden from user and only this much part of url should be seen 我有一个锚标记,即时通讯试图发送search.php的collg_id,它将我重定向到Brochure_request页面,现在我试图在collg_id之后再发送一个pdf_name,例如http:// localhost / aplus / broucher_request / 44 / hello。 pdf,但在网址中hello.pdf应该对用户隐藏,并且只应看到网址的大部分
http://localhost/aplus/broucher_request/44.
and on brochure_request page the i have a input tag pdf as input text and on input text i should get name of the pdf. 在Brochure_request页面上,我有一个输入标签pdf作为输入文本,在输入文本上,我应该得到pdf的名称。
Try this 尝试这个
<p class="center-align">
<a class="waves-effect waves-light btn modal-trigger hoverable"
href="<?php echo base_url('broucher_request/'.$res->collg_id.'/'.base64_encode($res->pdf_name));?>">
<i class="material-icons left">arrow_downward</i>Brochure</a>
</p>
Controller 调节器
public function broucher_request($id, $file)
{
$data['file'] = base64_decode($file);
$data['college_id'] = $id;
$this->load->view('home/brochure_request',$data);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.