Putting PHP in your web page

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Jul 6th, 2004, 01:56
Junior Member
Join Date: Jun 2004
Location: USA
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Jul 6th, 2004, 02:10
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Jul 6th, 2004, 06:56
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Jul 6th, 2004, 21:51
Junior Member
Join Date: Jun 2004
Location: USA
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Jul 6th, 2004, 22:39
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Jul 7th, 2004, 07:25
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Jul 7th, 2004, 07:33
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
yep, and using includes just makes it take longer, not a good way to go about it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Jul 8th, 2004, 04:25
Up'n'Coming Member
Join Date: Oct 2003
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
<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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old Jul 9th, 2004, 12:17
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,182
Blog Entries: 7
Thanks: 27
Thanked 21 Times in 18 Posts
Use XML and XSLT ?
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
Old Jul 9th, 2004, 14:43
Highly Reputable Member
Join Date: Aug 2003
Location: Australia
Posts: 662
Thanks: 0
Thanked 0 Times in 0 Posts
yeah, but isn't that like churning your own butter when you got butter already in your fridge?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #11  
Old Jul 9th, 2004, 18:02
Up'n'Coming Member
Join Date: Oct 2003
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
lol yea... I wouldn't recommend doing it. Doesn't mean he isn't gunna do it though.. lol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #12  
Old Sep 24th, 2004, 19:07
New Member
Join Date: Aug 2004
Location: Carlisle, UK
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #13  
Old Nov 19th, 2004, 20:59
Reputable Member
Join Date: Aug 2003
Location: Singapore
Posts: 321
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #14  
Old Jan 10th, 2005, 20:50
Anonymous User
Guest
Posts: n/a
Simple discussion boards can easily be made using PHP without a database. I would almost prefere it, unless you are hoping to have the depth like that of a forum. A guestbook is supposed to be relatively simple and small. I think that using PHP and perhaps XML or even just a txt file to store the info is a simple way to go. Plus you dont have to set up a database.

-www.atlantaunderground.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
putting, php, web, page

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

BB 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
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


All times are GMT. The time now is 21:22.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42