I'm creating a mini CMS for a client so he can easily update parts of his website.
At the moment i have lots of php files or switches to execute queries to update the content.
Is it possible to contain all this information in one file called functions.php, require it into the document and just call the function when it needs to be executed?
I've not really dabbled in functions before.
An example,
some of the tasks the client can do:
-update ticker on home page (updateTicker.php)
-update profiles (addProfile.php)
and so on...
can i add them into functions in 1 file?
function updateTicker() {
}
function addProfile() {
}
function updateProfile() {
}
Would this be the right way to go about it? and how can i call the function when submitting the form so it can update the database?
Question
game_over
I'm creating a mini CMS for a client so he can easily update parts of his website.
At the moment i have lots of php files or switches to execute queries to update the content.
Is it possible to contain all this information in one file called functions.php, require it into the document and just call the function when it needs to be executed?
I've not really dabbled in functions before.
An example,
some of the tasks the client can do:
-update ticker on home page (updateTicker.php)
-update profiles (addProfile.php)
and so on...
can i add them into functions in 1 file?
function updateTicker() {
}
function addProfile() {
}
function updateProfile() {
}
Would this be the right way to go about it? and how can i call the function when submitting the form so it can update the database?
Link to comment
Share on other sites
15 answers to this question
Recommended Posts