Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to call the php function while the page is getting load

Tags:

php

I need to call the php function while the page is getting load.

Means when I click a link or menu of the page Homepage.php, then it will redirect to the page called History.php. Here before loading the page History.php, it sholud call the function to get the data from the database.

Please spend your valuable time to answer this query. Thanks in advance.

like image 918
Indu Avatar asked May 24 '11 06:05

Indu


1 Answers

Top of History.php:

<?php
    include('/path/to/php/program/with/function.php');
    the_function();
like image 71
Quentin Avatar answered Nov 06 '22 18:11

Quentin