If I understand right, you are asking for a way to include two input values into a string which will then be the name of a web site that is loaded. I would do it somehow like this (in pseudo-code):
Validate catid and pagenum If validated, make string with URL from catid and pagenum, and load page from string Else, show error message (or default page)
When doing sensitive tasks (like file i/o, database access, and loading pages) based on user input it is always advisable to validate the input to make sure it is like expected. Otherwise, it could be an invitation to the 'bad guys' out there to execute bad script on the server.I would validate catid and pagenum by using the function ctype_digit() to check that they are integers, and also check that they are within the number range expected (or at least not null). Then I would define a string and put catid and pagenum into it together witht the other text needed to make the name of the file. Finally I would load it using a require().I hope this helps If there is anything else, let us know.