![]() |
Function with Mysql
Hey guys
I am a real newbie at functions; so I would like some help :) Basically I have a static version sorted: PHP Code:
Gareth |
Do you mean something like the following?
sql Code:
|
Hi Gareth,
Quote:
For example: PHP Code:
Alternativly, if you really want the mysql() bits inside the function you can just move it to the top of your function. You will need to remember to either use the global keyword for your database connection so that it can be used inside your function or pass your database connection to your function. Eg: PHP Code:
PHP Code:
|
a plain text file would do the trick to if a DB is not needed.
Then read the file into an array with file(). PHP: file - Manual With one cuss on each line in the text file. Not optimal but handy. Good Luck /EyeDentify |
Thanks, I will definitely have a look at both methods!
I would like to use a database, so I can easily update / edit it online (along with the rest of the acp is based on a database system). |
| All times are GMT. The time now is 10:58 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0