bhaghyasandar bhaghyasandar - 1 year ago 89
PHP Question

Is the object construct $bom-> without a method or property, correct for CodeIgniter?

echo anchor(site_url('bom/read/'.$bom->),'Read');
echo ' | ';
echo anchor(site_url('bom/update/'.$bom->),'Update');
echo ' | ';
echo anchor(site_url('bom/delete/'.$bom->),'Delete','onclick="javasciprt:return confirm(\'Are You Sure ?\')"');

Answer Source

First either delete $bam or replace it with correct value

        //$bom should have a value like 123 or 'article' etc
        echo anchor(site_url("bom/read/".$bom),'Read'); 
        echo ' | '; 
        echo anchor(site_url("bom/update/".$bom),'Update'); 
        echo ' | '; 
        echo anchor(site_url("bom/delete/".$bom), 'Delete',array('onclick' =>"javascript:return confirm(\'Are You Sure ?\')"));

      // u can also use this
        echo anchor('news/local/123', 'My News', 'onclick = "javascript:return confirm(\'Are You Sure ?\')"');

Please read (anchor):

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download