This is a discussion on "Putting PHP in your web page" within the PHP Forum section. This forum, and the thread "Putting PHP in your web page are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Putting PHP in your web page
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Putting PHP in your web page
Ok, I know this is a very basic question, but I'm new to PHP actually to web designing in general. I have a PHP script for a simple dissicusion board type program, I want to use it in my current web page, how do I go about putting it in an HTML document. Is it done the same way as JavaScript where you list JavaScript as your source type, or is there another procedure. This script is not database dependent and is suppose to be a very simple discussion board type program. Any advice would be helpful here.
Thanks Jodi |
|
|
|
|||
|
All you do is you put the script in your page and you rename the page blah.php . That'll make the script run (as long as your server supports php...) . Php has it's closing and ending tags that seperate it from other languages. I believe PHP's is the <? to open and ?> to close.
|
|
|||
|
I would advise against using PHP in your HTML documents. Your hosting needs to be set up to tell PHP to read every single HTML document before it's sent to the user. As you can guess, this slows things down a little and, depending on your host, probably isn't available.
Why can't you make the file a .php file? |
|
|||
|
Court Jestergmar, thanks I'll try it, I just wasn't sure if there was a different procedure when dealing with PHP files. Sirkent, I'm not sure what you mean? Do you know of another scripting language that could create a dicussion board kind of program, that would be speedier? The chose PHP because it is widely accepted and supported and seemed to be able to create what I wanted. However, I am open to suggestions!
|
|
|||
|
Well php can't not be supported... It's a server side scripting language.. so of course it'll be supported. But then again so is ASP , and all the other languages. I don't know how your going to be creating a discussion board without a database though. How do you plan on doing that? Only way that I know that is even remotely possible is to create an application and let people connect to each other via and let them share some variables... Can be done, but what a pain... I am building something similar to this in ASP because I am building a fighting arena. But I don't see much sense in a discussion board doing this.
|
|
|||
|
Jodi, all I'm saying, is make sure your documents are .php and not .html if you want to put PHP in them.
You can still put HTML in the documents that way. |
|
|||
|
yep, and using includes just makes it take longer, not a good way to go about it.
|
|
|||
|
<blockquote id="quote"><font size="1" face="geneva, verdana, arial" id="quote">quote:<hr height="1" noshade id="quote">Originally posted by Court Jester
I don't know how your going to be creating a discussion board without a database though. How do you plan on doing that?<hr height="1" noshade id="quote"></blockquote id="quote"></font id="quote"> Maybe using a flat-file system? |
|
||||
|
Use XML and XSLT ?
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
yeah, but isn't that like churning your own butter when you got butter already in your fridge?
|
|
|||
|
lol yea... I wouldn't recommend doing it. Doesn't mean he isn't gunna do it though.. lol
|
|
|||
|
What you mean m8 I wirtten a discussion board with flat file basically text files with little encryption. This was only for intranet. But for small amount of uses text file is fine it just when your talking about so many people trying to post at same time it comes a problem cos the server cant handle the that many queries at once it start to slow and people hate slow in this day and age. Just look how many people convert to use braodband instead of 56k. And who can blame them. With web design main aspect is people want information there & then. And not in a minute or two.
|
|
|||
|
Don't know what is your discussion board is like? I guess it maybe already has its own 'setup' script like Snitz Forums 2000 has. Otherwise, its really just putting the index and other files in your web site folder. The discussion board program, you said it is not database dependent? I was wondering how can it be such? Well you just put the database into the databse folder your host assigned to you ( which has read-write privileges ) and then you link them up using a connection string ( I've have had problems before with my connstrng ). I suspect there's a good article by the name of "PHP with databases" or the like, when I browsed the first page.. Hmm :razz:. Might wanna go check it out.
Well, I've got two articles about PHP written for beginners. Be sure to check them out. |
![]() |
| Tags |
| putting, php, web, page |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Putting C# into an ASP.NET Page. | alexgeek | ASP.NET Forum | 2 | Feb 5th, 2008 17:16 |
| need help putting a video on web page.... | earl080688 | Flash & Multimedia Forum | 1 | Oct 10th, 2007 04:04 |
| Putting css in an html page. | masonbarge | Web Page Design | 27 | Feb 7th, 2007 22:28 |
| A better way putting a menu bar, on every page | Joolsd186 | Web Page Design | 36 | Nov 3rd, 2006 07:29 |
| putting music on a web page | Dr. J | Introduce Yourself | 3 | Aug 19th, 2005 20:59 |