Jump to content

How do code like index.php?view= Etc...


Chris Cossie
 Share

Recommended Posts

Look at the current adress bar: index.php?showtopic=3845. So it looks like a database operator from the index.php to (in this case) retrieve data from the topic ID'd 3845.

Link to comment
Share on other sites

one thing those links dont explain is the proper method of linking that url. personally, i like my code to be valid xhtml 1.0, so when putting the & in the url use & if you are using multiple variables.so an example anchor code would look like this:

<a  href="http://www.domain.com/index.php?go=media/audio&play=track1">Audio</a>

and on domain.com/index.php you would have this:

<?php$go=$_GET['go'];$play=$_GET['play'];//page template stuff and whateversinclude('http://www.domian.com/'.$go.'/index.php?play='.$play); //this would load http://www.domain.com/media/audio/index.php?play=track1

that right there is a basic way to template your site, there are better methods of course. as far as it saying 'act' or 'go' or whatever, thats totally your choice, thos words are not predefined, so you can make up your own variables if your wish like I just did in the example above.

Link to comment
Share on other sites

There are variables however that are parsed by the browser, I believe it was 'copy' and one or two other variables. These will obviously not work in a php script, since they're parsed at the client's side. At least, that's what I could make up from one tutorial I was unable to retrieve.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...