Current location: Hot Scripts Forums » Programming Languages » PHP » Display A Word From PHP


Display A Word From PHP

Reply
  #1 (permalink)  
Old 07-12-03, 12:58 AM
Vyrus Vyrus is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Display A Word From PHP

I would like to display a word from one PHP file to the other. Like this:


In the displaying PHP file called "members2.php" with the following coding:

Code:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>
Name: <? $UserGamingName ?>
<?php include("database.php"); ?>
</body>
</html>




And the other PHP file called "database.php" which will provide what will be shown in "members2.php" with the following coding:

Code:
<?php
$UserGamingName = "TestName";
?>
Reply With Quote
  #2 (permalink)  
Old 07-12-03, 05:01 AM
ChristGuy ChristGuy is offline
Operations Support Develo
 
Join Date: Jun 2003
Location: Rivonia, South Africa
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Greetingz...

Try this:
PHP Code:

<?php

  
Include("database.php");
?>
<HTML>
...
</HTML>
That should work. for more info on Include / Require: http://www.php.net/include http://www.php.net/require
__________________
Till We Meet Again...
Clifford W. Hansen
Aspivia (Pty) Ltd

"We Have Seen Strange Things Today!" Luke 5:26
Reply With Quote
  #3 (permalink)  
Old 07-13-03, 12:16 AM
Vyrus Vyrus is offline
Newbie Coder
 
Join Date: Jul 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
thanks for the help
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 02:22 AM
PHP Dudes - Hi All stuart New Members & Introductions 4 05-03-04 01:22 PM
Ad management and optimisation using php surebetdmg PHP 0 08-28-03 06:45 PM
Manipulating arrays for display in HTML madsurfer007 PHP 3 08-07-03 08:26 PM
edit php in Squirrelmail jrcortrightiii PHP 1 07-10-03 02:08 PM


All times are GMT -5. The time now is 10:26 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.