I am making an admin panel for a small project. I want to use dynamic URLs to edit specific data entries. For instance:
file.php?edit&n=53
I want this URL to edit entry 53.
I use a switch statement to check for the edit page, but how do I check whether or not the URL has the &n=x extension in the same switch statement?
Ex:
switch $_SERVER['QUERY_STRING']
{
case "edit"
//shows a list of entries to edit
break;
}
Would I just make another case with a reg expression? How would I make said expression?
I realize I could just make seperate file named edit and use only one tier of query string, but I would like to know how to do this.
Thanks in advance!