Reputation: 979
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();
?>
Upvotes: 0
Views: 101
Reputation: 507
You can also do this
<?php
echo form_open();
echo form_input($data);
echo "By clicking Register, you agree to our <a href='".base_url()."terms/'
target='_blank'>Privacy Terms</a>";
echo form_submit('submit','Register');
echo form_close();
?>
Upvotes: 1
Reputation: 2218
I dont think you need the brackets after echo. Why not like this:
<?= form_open();?>
//Your html stuff
<?=form_submit();?>
<?= form_close();?>
Upvotes: 1