Topic awaiting preservation: php include question... (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 08-19-2002 07:08
Can anyone give me some direction on how I would go about including only a certain portion of a php page into another...I guess I would be referring either to a declared variable or a function, but am unsure of the syntax in this case. Here is my scenario: code: <td><?php require_once("movies.php"); echo "$active_movie_13"; ?></td>
|
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 08-19-2002 07:42
aeh, if I understood you correctly, the answer would be yes! |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 08-19-2002 13:10
Thumper: Technically I'm not sure why you don't just grab the information from the database directly on the page you want it to be one but to answer the specific question (rather than querying your approach ) - I'd use something like this: code: $file_path = "http://$HTTP_HOST/movies.php";
quote:
|
Paranoid (IV) Inmate From: Deeetroit, MI. USA |
posted 08-19-2002 16:41
Hmm...Emps querying the database direct would not be such a good idea as I am trying to maintain modularity with this as much as possible. I am thinking the fact that the "movies.php" is querying the whole table for me and is "refreshed" immediately after administrators make their changes, it will nullify the need to communicate with the database every time. Literally, all the "movies.php" page is accomplishing is to list the path's to each respective movie and carry some of the parameters that admins have manipulated for the object. |