I’m trying to create a demo bar just like wordpress theme companies do
.So far, i was able to achieve a bit of it with
$('#window').load('index.php?action=theme&themeID=5');
Now i want to be able to create specific URLs which trigger specific code.
For example, the above mentioned code runs if i go to
http://mysite.com/theme.php?id=5
How do i do that? is there any way to do the same with php?
Easily done with PHP, you just have to echo the
$_GET['id']value inside your script:or
Reference
And yes,
GETparameters are unsafe, just asPOSTparameters may also be manipulated. You should valid to check if the parameter being passed is valid in yourPHPpage beforing echoing it directly to your script.