CodeIgniter Forums
IF as Page - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Regional User Groups (https://forum.codeigniter.com/forumdisplay.php?fid=25)
+--- Thread: IF as Page (/showthread.php?tid=68954)



IF as Page - Germanikus - 09-18-2017

Hello,
in my page I used this code to put several pages into one file.
This was very useful and would like to incorporate this in this framework as well.
But how is the URL address to call the content "edit"?

PHP Code:
<?php
    
if(isset($_GET["action"]))
        {
            
$action $_GET["action"];
        }
    else
        {
            
$action "";
        }
        
    if (
$action == "")
        {
?>
hallo
<?php
        
}
    if (
$action == "edit")
        {
?>
du da
<?php
        
}
?>



RE: IF as Page - skunkbad - 09-18-2017

The questions you have been asking indicate that you have a severe lack of knowledge as to how CodeIgniter works. Before doing anything else, read this:

https://www.codeigniter.com/user_guide/


RE: IF as Page - PaulD - 09-18-2017

Apart from skunkbad's great advice above, why would you use a GET to edit a record?


RE: IF as Page - InsiteFX - 09-19-2017

Looks like PHP code getting JavaScript