dongxun2903 2014-10-15 07:56
浏览 36
已采纳

Codeigniter以php形式插入html行

I use codeigniter to show registration form like in the code below and I just want to add a line "By clicking Register, you agree to our Terms" but the syntax of that line is not correct. Could you please help me.

<?php 
echo form_open();
              blablabla
echo form_input($data);
echo ("By clicking Register, you agree to our <a href="<?php echo base_url(); ?>terms/" target="_blank">Privacy  Terms</a>");
echo form_submit('submit','Register');
echo form_close(); 
?>
  • 写回答

2条回答 默认 最新

  • douyong1886 2014-10-15 08:00
    关注

    I dont think you need the brackets after echo. Why not like this:

    <?= form_open();?>
    //Your html stuff
    <?=form_submit();?>
    <?= form_close();?>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部