The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
PHP $_GET help please (a bit of a newbie question)
Hey guys, I'm just getting into PHP and have started on a site for someone, it will be dual language, and this is what I have so far:
PHP Code:
Is there any other easier way of achieveing this as well? I thought this was the easiest way I could find. Cheers Jason |
#2
|
|||
|
|||
actually, $_GET['lang'] goes nowhere, as you call for a different variable afterward: $lang...
use $_GET['lang'] everywhere... |
#3
|
||||
|
||||
Strangely enough - when I go down that road - it no longer works, but as my code above - that works fine ... any suggestions?
Cheers [edit] I removed the == and replaced with just one - I've put two in and it's fine now, but I still need to figure out how to default it to Dutch (when there is no ?lang=nl placed at the end of the script) |
#4
|
||||
|
||||
PHP Code:
Anyway, mixing code and data is no good practice! I'd suggest to use a template engine. |
#5
|
||||
|
||||
Store everything in a MySQL database and pull it out that way? That was an option but for a simple site, I thought it was just easier to pull it out of each page (plus it would share my Forum database which often has too many connections).
Thanks for your help - I understand it better now. Jason |
#7
|
||||
|
||||
Installed and experimenting - thanks guys, your help is very much appreciated
Jason |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|