Bluehost.com Web Hosting $6.95

Printing out html

This is a discussion on Printing out html within the PHP General forums, part of the PHP Programming Forums category; Hello, I have just entered PHP "world" and I have many questions. I have already made PHP script ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-28-2003
Labunski
 
Posts: n/a
Default Printing out html

Hello, I have just entered PHP "world" and I have many questions. I have
already made PHP script that send's htm form values via e-mail.
Now I want to build PHP based web page..

>> 1.question>>

For example I have index.php file, but I want HTML (index.html) file to be
"printed out". How php code should look like?

>> 2.question >>

I know that code for IP address ($ip) is:
$ip = getenv ("REMOTE_ADDR");

For example I have Index.php file, and I want an IP adders to be viewed in
the TD:

<td> IP address </td>

How should I write it?


Sorry for my dumb questions and bad english,
Regards,
Lab.
Reply With Quote
  #2 (permalink)  
Old 12-28-2003
Mike Brum
 
Posts: n/a
Default RE: [PHP] Printing out html

1. if you have index.php, then just get rid of index.html and print your
content via print or echo statements.

2.

$ip = getenv("REMOTE_ADDR");
print "<td>IP Address: " . $ip . "</td>";

(there's a few ways you can do that - this is just the standard I use)

Regards

-M

-----Original Message-----
From: Labunski [mailto:romans@skulme.lv]
Sent: Saturday, December 27, 2003 9:47 PM
To: php-general@lists.php.net
Subject: [php] Printing out html

Hello, I have just entered PHP "world" and I have many questions. I have
already made PHP script that send's htm form values via e-mail.
Now I want to build PHP based web page..

>> 1.question>>

For example I have index.php file, but I want HTML (index.html) file to be
"printed out". How php code should look like?

>> 2.question >>

I know that code for IP address ($ip) is:
$ip = getenv ("REMOTE_ADDR");

For example I have Index.php file, and I want an IP adders to be viewed in
the TD:

<td> IP address </td>

How should I write it?


Sorry for my dumb questions and bad english, Regards, Lab.

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 07:54 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0