Code and general online PC help forum. Website. Programming. Technical.
1 post in topic - Login  ssl lock  Register - Be the first to post a reply
    1,675 topic views 

Coding PHP functions to use on multiple different pages

Unread postby » MOC » Wed, 20 April 2022, 6:17 am | #1 of 1  Reply

Learning php is extremely rewarding and opens up functionalities like SQL reading, writing, and manipulation of data. PHP is used in conjunction with HTML, SQL, CSS, JavaScript and other computer languages, to create the HTML code that is sent to your web browser.

A quick example, let's look at search.php. Search.php is called through your browser, and search.php will have coded into it search.html to use for the HTML output. Search.php may also call upon other HTML pages such as searchresults.html. Further to this, some of the functions used to output information in HTML form come from global functions that can be used on almost any of your web pages, and which are found in functions.php. If you call upon a function from your search.html, the function used will be from search.php. If the function does not reside in search.php, functions.php will be looked at to run the function you are calling upon. Learning how these PHP files all work together will open the doorway for you to create powerful functions that can be used throughout your website. For instance, I created code to display the forum names you've selected to search in when performing keyword searches, and the code for that functionality is found in functions.php, not in search.php.

Just remember, especially as a newbie to PHP programming, functions.php and the other PHP files are extremely powerful and complex. Just one character out of place and your whole website will become inoperable. Notepad can be used by experienced coders, but a program like Dreamweaver may be more suitable for beginners or even experienced coders alike, just to make the translation and accurate coding easier for you to maintain and manage.

If you require more functionality for your website, PHP offers an unlimited amount of opportunities, all you need to know is how PHP is being used when installed on your web server, and then how to write PHP for the version of PHP you are using. If you require more specific information or need certain functions created, don't be afraid to ask! :ugeek:


Share Permalink | PID: #p7239
User avatar
MOC
AVZoom: Admin
100 200 300 400 500 600
Posts: 644
 
#2 Joined:
Tue, 1 May 2012, 4:54 pm
Location: Australia
Thanks: 23
Thanked: 13


Login to clear banner


  SSL Secure Login - You will return to topic Coding PHP functions to use on multiple different pages on login.
Ask the questions you need an answer for and answer any questions you can.
    1,675 topic views 

LOGIN or REGISTER @ MoneyOnComputer.com


  • Similar Topics • Maximum 8

    Replies
    Views
    Last post

Return to PROGRAMMING AND TECHNICAL Back

WhoIs Online

Users browsing this forum: No registered users and 2 guests

cron