dongxun2903 2014-10-15 15: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 16:00
    关注

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

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

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试