Webmaster Forum

Lionsanime Directory   High Bandwidth Dedicated Servers   V7N Directory
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Reply
 
LinkBack Thread Tools Display Modes
Old 03-10-2007, 10:40 PM   #1 (permalink)
Inactive
 
Join Date: 11-07-06
Location: Springfield
Posts: 111
iTrader: 0 / 0%
daniel0012 is on the right pathdaniel0012 is on the right path
Send a message via AIM to daniel0012 Send a message via MSN to daniel0012 Send a message via Yahoo to daniel0012
Display HTML code

I want to email and HTML code to someone so they can use it but I don't want the browser to read and display the code.
daniel0012 is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 03-10-2007, 10:56 PM   #2 (permalink)
v7n Mentor
 
digiweb's Avatar
 
Join Date: 04-07-06
Location: Manchester, NH
Posts: 762
iTrader: 1 / 100%
digiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of lightdigiweb is a glorious beacon of light
Send a message via Yahoo to digiweb Send a message via Skype™ to digiweb
could you re-state that? Because the server is doing the sending so the browser would never see the html the recipient receives anyway.
digiweb is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-10-2007, 10:59 PM   #3 (permalink)
Inactive
 
Join Date: 11-07-06
Location: Springfield
Posts: 111
iTrader: 0 / 0%
daniel0012 is on the right pathdaniel0012 is on the right path
Send a message via AIM to daniel0012 Send a message via MSN to daniel0012 Send a message via Yahoo to daniel0012
Code:
<html> <blah blah>

I want to be able to make a box like that so I can display a code.
daniel0012 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-11-2007, 12:33 AM   #4 (permalink)
Inactive
 
Join Date: 01-23-07
Location: Netherworld, under Buenos Aires.
Posts: 169
iTrader: 0 / 0%
Hades is liked by somebodyHades is liked by somebodyHades is liked by somebodyHades is liked by somebody
Send a message via MSN to Hades Send a message via Yahoo to Hades
You have 2 options,

1) Send the email in Plain Text Only format, so it will not render the HTML code.
2) Use PHP or some other language to parse the code and convert its entities to plain text before sending the email. If you use PHP you can make it work with the htmlentities function.
Hades is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-11-2007, 06:42 AM   #5 (permalink)
Inactive
 
Join Date: 11-07-06
Location: Springfield
Posts: 111
iTrader: 0 / 0%
daniel0012 is on the right pathdaniel0012 is on the right path
Send a message via AIM to daniel0012 Send a message via MSN to daniel0012 Send a message via Yahoo to daniel0012
What I really want to do is have a web page display the code for the person to copy.
I worded it poorly. Sorry.
Like when you go to a website that has codes for use, and the code is in this text box.
Like on this site.

http://www.dynamicdrive.com/dynamicindex16/showhint.htm
daniel0012 is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-11-2007, 09:24 AM   #6 (permalink)
Inactive
 
Join Date: 01-23-07
Location: Netherworld, under Buenos Aires.
Posts: 169
iTrader: 0 / 0%
Hades is liked by somebodyHades is liked by somebodyHades is liked by somebodyHades is liked by somebody
Send a message via MSN to Hades Send a message via Yahoo to Hades
Ok, you need a bit of PHP skills to do that.

Having your code stored in a variable, you can convert it using the htmlentities function.

PHP Code:
$myCode "<p>Hello!</p>";
$myHTML htmlentities($myCode);
echo(
$myHTML); 
That will display the code in the page.
Hades is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-11-2007, 11:49 AM   #7 (permalink)
Inactive
 
Join Date: 11-07-06
Location: Springfield
Posts: 111
iTrader: 0 / 0%
daniel0012 is on the right pathdaniel0012 is on the right path
Send a message via AIM to daniel0012 Send a message via MSN to daniel0012 Send a message via Yahoo to daniel0012
Thanks for your help.
daniel0012 is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add an html code in a page? madcaptains Coding Forum 9 03-10-2008 05:49 PM
Html code to go to another website shahab6 Coding Forum 6 02-25-2007 05:51 AM
HTML code please. Trapper Coding Forum 9 07-27-2006 05:34 AM
Cookies Display Different HTML for Return Visitors blazet Coding Forum 2 06-30-2005 10:39 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 05:15 AM.
© Copyright 2008 V7 Inc