Welcome Guest, Not a member yet? Register   Sign In
Syntax question
#1

Hello friends,
I see a lot of project using this syntax
<div class="col-sm-6">
 <input class="form-control" name ="brand_image" id="brand_image" type="file">
<img src="<?php echo base_url();?>{brand_image}" height="100" width="100" class="img img-responsive" style="margin-top:5px">
<input class="form-control" name ="old_image" id="old_image" type="hidden" value="{brand_image}"  >
  </div>

Why is used {brand_image} and not  <?php echo $row['brand_image'];?> ?
Example : <input class="form-control" name ="old_image" id="old_image" type="hidden" value="<?php echo $row['brand_image'];?>"  >
Reply
#2

look like your refering to bootstrap ; that kind of syntax is outdated anyway .
I start a form with :

<?=form_open('contact') ?>
<?= csrf_field() ?>


then :
<div class="form-group">


<div class="col-sm-6"> ---- flexbox is better !
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Reply
#3

Most do not use it because the brand image never changes it's their brand.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#4

Maybe I'm mistaken, but {brand_image} has nothing to do with Bootstrap. This example code probably use the View Parser.

Also, since when is Bootstrap outdated? There's always new stuff coming up. It doesn't mean all the previous stuff is obsolete.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB