Reply
printing html coding with PHP print"" function
Old 10-09-2004, 06:30 PM printing html coding with PHP print"" function
Skilled Talker

Posts: 79
Trades: 0
Hello

I currently maintain an e-bulliten where I'm required to update information regarding upcoming conferences.

Currently, I write the code by hand, using the following template and filling in the gaps:

Code:
	<p><a name=""></a><strong></strong></p>
	<p>Date: </p>
	<p>description</p>
	<p>Location: </p>
	<p>Further information: <a href="" target="_blank"></a></p>
<p align="right"><a href="#top">Back to Top</a></p>
<hr /> 
<!-- -->
I will be able to make the bulletin quicker, by creating an HTML form, where I put the info in and submit it. I will then use a PHP page tohandle the form and print out the code above, with the variables included where they belong.

Then, I just copy the code into the HTML page I'm updating and it will be a hell of a lot quicker.

Currently, my basic form is here: http://hamishnet.homelinux.com/~hami...ences_form.php .

My problem is: When one uses the "print" command in PHP, to print, say

Code:
<p>Date:  </p>
it reads the <p>'s etc as HTML command (which is obviously very clever, but not what I want).

I know that I can use \"$href\" to escape the apostrophies (").

My question is, how can I get PHP simply to print the HTML code and NOT to include it into the page?

Thanks
Hamish
__________________
http://www.iskm.com/backup/ secure and fully automated computer data backup for small and medium sized companies.

FREE OFFSITE BACKUP
hamish is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-09-2004, 09:32 PM
KeithMcL's Avatar
Super Talker

Posts: 128
Location: Dublin, Ireland
Trades: 0
If you're going to copy the code into a HTML page the easiest thing is to print the code out inside a textarea. The HTML code will remain in tact
KeithMcL is offline
Reply With Quote
View Public Profile Visit KeithMcL's homepage!
 
Old 10-10-2004, 07:09 AM
Skilled Talker

Posts: 79
Trades: 0
ah yes, thanks. I noticed that last night but didn't make the connection.

Thanks,

Hamish
__________________
http://www.iskm.com/backup/ secure and fully automated computer data backup for small and medium sized companies.

FREE OFFSITE BACKUP
hamish is offline
Reply With Quote
View Public Profile
 
Old 10-10-2004, 08:25 AM
Republikin's Avatar
Defies a Status

Posts: 3,190
Trades: 3
That or use single quotes, the variables will not be parsed inside single quotes.
Republikin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to printing html coding with PHP print"" function
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.10923 seconds with 13 queries