hi.. i've asked questions similar to this before but never really got the answer i was looking for. how do i make urls for my links something like index.php?page=home ...i still don't fully understand how to do this.. i don't need it to use MySQL, just php. thanks in advance.
heres a snippet from a news publishing app i was making
PHP Code:
<?PHP
function test($id){
echo "$id";
}
function test2(){
echo "blah blah blah";
}
switch($_GET['action']) {
case 'test':
//url looks like page.php?action=test&id=get_whats_after_id
test($_GET['id']);
break;
case 'test2':
//url looks like page.php?action=test2
test2();
break;
}
?>
this may not be the best way todo this but it works, oh btw i get error if i just goto page.php dunno how to fix it yet, only been learning for about 2 weeks
You can also let it grab a file. I never set it up on my site and I can type ..com/boy&file=index and it works for me so I think It should work for you.