• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Solved] Problem with User section

#4
Why would you need a foreach ... loop to handle multiple accounts, if your model returns only one account?
Besides that, right below the line with foreach, you are opening a form twice:
PHP Code:
<?= form_open() ?>
     <form role="form" action="#" method="post"> 
The first line is the form_open() function in the form helper, this creates the <form .. > tag for you.
The second line is opening another form!
Line 75 closes one of the forms, but the other one stays open.

The syntax
PHP Code:
<?php foreach ( ... as ... ) { ?>
...
<?php ?>

is difficult to read, especially if you have nested foreach or if {} structures in your view.
Try the alternative syntax:

PHP Code:
<?php foreach (... as ... ) : ?>
...
<?php endforeach; ?>
Reply


Messages In This Thread
[Solved] Problem with User section - by wendaf - 07-31-2017, 02:05 PM
RE: Problem with User section - by Wouter60 - 08-01-2017, 06:45 AM
RE: Problem with User section - by wendaf - 08-01-2017, 08:37 AM
RE: Problem with User section - by Wouter60 - 08-01-2017, 11:11 AM
RE: Problem with User section - by wendaf - 08-01-2017, 02:00 PM
RE: Problem with User section - by jarmen_kell - 08-01-2017, 06:52 PM
RE: Problem with User section - by wendaf - 08-02-2017, 02:18 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.