[advanced search]
Results from the most recent live auction are here.
19 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming > CODE
User Name
Password

Old 10-09-2005, 08:23 PM   · #1
Coolprogram
NamePros Regular
 
Name: Pete
Location: U.S.A.
Trader Rating: (12)
Join Date: Jul 2005
Posts: 648
NP$: 67.00 (Donate)
Coolprogram has a spectacular aura aboutCoolprogram has a spectacular aura about
Just felt like sharing this.

PhP is also used in html. You put the HTML codes in but keep it as .php. To make a PHP form or anything else u use html in it. almost no matter what.
-Coolprogram


Please register or log-in into NamePros to hide ads
__________________
Your Link Here 10np$ a month Please PM me if you want theses spaces
' '
' '
ProTechGFX.com
Coolprogram is offline   Reply With Quote
Old 10-10-2005, 02:45 PM   · #2
Shorty
Senior Member
 
Shorty's Avatar
 
Name: Thomas White
Location: England
Trader Rating: (15)
Join Date: Sep 2005
Posts: 1,033
NP$: 31.15 (Donate)
Shorty is just really niceShorty is just really niceShorty is just really niceShorty is just really nice
Just to clarify what he said:

You need:

Code:
<?php echo " <html> <!-- any html wanted in here, be careful when using double quotation marks --> </html> "; ?>

Basically you have to echo the HTML and the browser wont notice the difference. I hope this makes it a little clearer for beginners...:P
Shorty is offline   Reply With Quote
Old 10-10-2005, 03:29 PM   · #3
miseria
SQLdumpster.com
 
miseria's Avatar
 
Name: Unknown
Location: West Sussex, UK
Trader Rating: (7)
Join Date: Jun 2005
Posts: 543
NP$: 108.00 (Donate)
miseria will become famous soon enoughmiseria will become famous soon enough
You don't have to echo the HTML. Just as long as the HTML isn't within the PHP code
__________________
!!!!!!! see something you like? Accepting offers for great affiliate websites !!!!!!!
Free Databases for your Website | All Things Playstation 3
Website Design Books | Music While You Work? | Computer Gadgets
miseria is offline   Reply With Quote
Old 10-11-2005, 06:49 AM   · #4
.PJ
NamePros Regular
 
.PJ's Avatar
 
Trader Rating: (5)
Join Date: Aug 2004
Posts: 369
NP$: 0.00 (Donate)
.PJ is on a distinguished road
Lol he made no sense at all, Thanks for explaining this Shorty, it might be useful to n00bs who are starting PHP /HTML coding.

I knew this back from a while ago anyway (the hard way)

Also, isnt it possible if you use double quotes on the echo that you can use a single quote in the html tags? i.e

echo" <html> <body bgcolor='#000000'>";

something like that.

Also if you want or need to put in a double quote, but dont want to put it outside a php tag, then you can always put a back slash "\" infront of it i.e

echo" <html> <body bgcolor=\"#000000\">";

I dont know, but yeah, anyway :P

PJ
__________________
L33TSig.net
.PJ is offline   Reply With Quote
Old 10-11-2005, 07:34 AM   · #5
primacomputer
Senior Member
 
Trader Rating: (0)
Join Date: Mar 2004
Posts: 1,404
NP$: 2705.50 (Donate)
primacomputer is a jewel in the roughprimacomputer is a jewel in the roughprimacomputer is a jewel in the rough
You can also write some C code that generates the HTML you want, place that code in a variable in your PHP script, write a C interpretor in PHP that precesses that C code and emails the output to another server where it is served to the user. Just because something can be done doesn't mean it should

On two occasions I've actually fired programmers for doing what's described above; inserting HTML into CGI scripts when they had been told to insert PHP into HTML.
primacomputer is offline   Reply With Quote
Old 10-11-2005, 11:52 AM   · #6
Shorty
Senior Member
 
Shorty's Avatar
 
Name: Thomas White
Location: England
Trader Rating: (15)
Join Date: Sep 2005
Posts: 1,033
NP$: 31.15 (Donate)
Shorty is just really niceShorty is just really niceShorty is just really niceShorty is just really nice
Originally Posted by miseria
You don't have to echo the HTML. Just as long as the HTML isn't within the PHP code


Sometimes it's necessary.

And yeah .PJ, you can use \" or ', just never " on it's own. It's not even needed to use quotes at all in most situations, only when there are gaps in the " and " content and I think when validating. I found this all out the hard way too.

When I first started coding/programming with php I went nuts for ages over a simple script that was returning a php error because I was echoing the code and using quotation marks. I guess in the end,you learn by making mistakes. (I'm amazed this simple topic has drawn so much commenting here )
Shorty is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Internet Sharing Problem rtonia The Break Room 0 09-12-2005 07:53 AM
File Sharing Application Raf The Break Room 6 06-07-2004 08:59 AM

Site Sponsors
http://www.mobisitetrader.com/ Traffic Down Under Click to Watch Instant Video
Advertise your business at NamePros
All times are GMT -7. The time now is 05:41 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0