This is a discussion on Hyperlink question (newbie...) within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi! I'm new to PHP - can somebody please explain these following links to me - the syntax? I'm not ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi!
I'm new to PHP - can somebody please explain these following links to me - the syntax? I'm not sure what the ./ means, although I think that the ?page=products is passing the value 'page=products'. <a href="./">Home</a> <a href="./?page=products">Products</a> I know it's a simple question, but I've been searching for an answer and I don't know a good search phrase to find the answer I need. Thanks in advance! JJBL |
|
|||
|
../ refers to the current directory
here you are not using any file name. which defaults to the default file used for index file. i would recommend doing something like this tough : <a href="/index.php?page=products">Products</a> As some hosts could be configured to have index.php as default documents, some other index.php3. and so on. It's best to always point to the file that way you can avoid weird surprises. Hope this helps. Steve. "JJBL" <elkgrover@hotmail.com> wrote in message news:v6qHf.14242$qg.3554@news01.roc.ny... > Hi! > > I'm new to PHP - can somebody please explain these following links to me - > the syntax? > > I'm not sure what the ./ means, although I think that the ?page=products > is > passing the value 'page=products'. > > <a href="./">Home</a> > > <a href="./?page=products">Products</a> > > I know it's a simple question, but I've been searching for an answer and I > don't know a good search phrase to find the answer I need. > > Thanks in advance! > > JJBL > > |
|
|||
|
JJBL,
You are correct that the ?key=value at the end of a URL passes "variables" to the page with the specified value. That said, neither of your questions has anything to do with PHP. A good search query on google for this subject would be things like: HTML URL Uniform Resource Locators Look for content from the W3C or Wikipedia or RFC.org as these sources will likely give you the most useful information. |