CodeIgniter Forums
problem with a view - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: problem with a view (/showthread.php?tid=18500)



problem with a view - El Forum - 05-08-2009

[eluser]junaids[/eluser]
hi. i have a little problem with a if statement in my view. i want to echo "something" if user has not entered his full credentials.
Code:
&lt;?php if($Country==NULL)                                                                                      {echo "Your profile is incomplete. Please complete it"<a href="&lt;?= site_url('user/completeregister') ?&gt;">here!</a> ;} ?&gt;

i m getting an error on this line. if anyone can correct it for me.


problem with a view - El Forum - 05-08-2009

[eluser]Dam1an[/eluser]
I assume the error is because you have PHP within your PHP (you open another set of PHP tags in your echo statement)
Try
Code:
&lt;?php
if($Country==NULL) {
  echo 'Your profile is incomplete. Please complete it '.anchor('user/completeregister', 'here');
}
?&gt;



problem with a view - El Forum - 05-08-2009

[eluser]junaids[/eluser]
thanks dear.