• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anchor setup wih a php echo

#4
(07-08-2019, 01:35 AM)neuron Wrote: You don't have to use CI's anchor function. 
Personally I don't use it.

If you want to use it: 
PHP Code:
echo anchor('news/local/123?id=' . <?php echo $row['id']; ?>, 'My News', 
array(
'title' => 'The best news!',
'class' => 'btn btn-warning',
'onclick' => 'return confirm('Are you sure to delete data?')?true:false;'
)
); 
 
Also avoid relative urls. (if you use anchor() function you don't have worry about it)
Use in following formats:
1. "/addEdit.php" (starting with backslash) or
2. "http://www.domain.com/addEdit.php" (full URL)

First one result's less code and easy to maintain than second format

Thank you so very much Heart
Reply


Messages In This Thread
Anchor setup wih a php echo - by Mekaboo - 07-07-2019, 08:11 PM
RE: Anchor setup wih a php echo - by neuron - 07-08-2019, 01:35 AM
RE: Anchor setup wih a php echo - by Mekaboo - 07-08-2019, 05:30 PM
RE: Anchor setup wih a php echo - by Wouter60 - 07-08-2019, 05:32 AM
RE: Anchor setup wih a php echo - by Mekaboo - 07-08-2019, 05:34 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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