Reply
PHP Script to HTML Site?
Old 10-09-2009, 12:11 AM PHP Script to HTML Site?
Experienced Talker

Posts: 34
Trades: 0
Hi there,

could you please tell how to add a PHP Script to an html site. I have a plan to add an instant domain name checker script to my site. But my site is simple html. Could you please tell how to make this work?

Thanks in advance!!
__________________
Free SEO Guides from SEO Experts * Use 'Bounce Back SEO' for SEO Services

Get Free Oneway Backlinks Submit your websites to Online Business Directory
flek is offline
Reply With Quote
View Public Profile Visit flek's homepage!
 
 
When You Register, These Ads Go Away!
Old 10-09-2009, 05:58 AM Re: PHP Script to HTML Site?
lizciz's Avatar
Ultra Talker

Posts: 330
Name: Mattias Nordahl
Location: Sweden
Trades: 0
I don't really understand what you want to achieve, but you can mix html and php code in your documents in any way you like.

PHP Code:
<p>Some html code here</p>
<?php
   
echo "<p>And then some html generated by php</p>";
?>
<p>You can start php tags <?php echo "wherever you want to.";  ?></p>
<?php

if (2) {
   
?>
   <p>4 is indeed greather than 2</p>
   <?php
} else {
   
?>
   <p>4 isn't greather than 2? How odd.</p>
   <?php
}

?>
Just remeber to change the file extension to .php
__________________
596f75206d65616e20796f752063616e2061637475616c6c79 207265616420746869733f
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 10-09-2009, 06:16 AM Re: PHP Script to HTML Site?
chrishirst's Avatar
Super Moderator

Posts: 22,226
Location: Blackpool. UK
Trades: 0
Assuming that your hosting actually supports PHP scripting.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Growing old is mandatory - Growing up is optional
Code Samples | People Counting System | Bits & Bobs
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-10-2009, 07:29 AM Re: PHP Script to HTML Site?
Experienced Talker

Posts: 34
Trades: 0
Actually am trying to put a contact us form (php) into a simple html site - <removed> now. If this goes well I will add an instant domain name checker too..
__________________
Free SEO Guides from SEO Experts * Use 'Bounce Back SEO' for SEO Services

Get Free Oneway Backlinks Submit your websites to Online Business Directory

Last edited by chrishirst; 10-10-2009 at 09:14 AM..
flek is offline
Reply With Quote
View Public Profile Visit flek's homepage!
 
Old 10-10-2009, 11:41 AM Reply to PHP Script to HTML Site?
Novice Talker

Posts: 8
Name: Tharaka Deshan
Trades: 0
All you have to change the file extension to .php
and put your php codes inside html codes.

Ex:
<html>
Put your normal html codes here
<?php
//Put your php codes here
?>
Put your normal html codes here
</html>

Last edited by Tharaka Deshan; 10-10-2009 at 11:45 AM..
Tharaka Deshan is offline
Reply With Quote
View Public Profile
 
Old 10-10-2009, 02:28 PM Re: PHP Script to HTML Site?
King Spam Talker

Posts: 1,409
Trades: 0
If you do not want to change your page names from html to php all you have to do is set the server to parse html pages as php. This is done in the .htaccess file or php.ini depending on the sever config. The actal syntax will vary slightly depending on the version and the server config also.
__________________
Colbyt
colbyt is online now
Reply With Quote
View Public Profile
 
Old 10-10-2009, 08:09 PM Re: PHP Script to HTML Site?
rednimaT's Avatar
Skilled Talker

Posts: 65
Name: Taminder B.
Location: San Jose, CA
Trades: 0
you can also create a separate file (like checker.php), then from your HTML page you can have a form where the target is checker.php.

I think that's what you meant right?
__________________
NRG Lab - Web Design Services & Resources
(HTML/PHP/MySQL/JavaScript/AJAX/SEO)
rednimaT is offline
Reply With Quote
View Public Profile Visit rednimaT's homepage!
 
Old 10-11-2009, 07:28 AM Re: PHP Script to HTML Site?
Junior Talker

Posts: 3
Name: tolga firatoglu
Trades: 0
Use as Thraka said. Not with html within echoes.
Html within echoes needs some performance.
gentleRain is offline
Reply With Quote
View Public Profile
 
Old 10-12-2009, 03:27 PM Re: PHP Script to HTML Site?
Novice Talker

Posts: 8
Name: Tom yates
Trades: 0
If you web host has PHP support enabled for your account , youll be able to do this , however if not . the only way around it would be to do an iframe to a webhosting account which does :S
__________________
High Quality Dell Inspiron Chargers for every model available
webdevuk is offline
Reply With Quote
View Public Profile
 
Old 10-12-2009, 06:03 PM Re: PHP Script to HTML Site?
mwsource's Avatar
Skilled Talker

Posts: 59
Name: Reid
Location: Georgia, USA
Trades: 0
flek:
1. Who do you how with and do they support PHP scripts?
2. Is the code your planning on working with a full .php file or a php code snippet?

If so to #1 and if it's a snippet, you will need to:
[1] Change the extension of the .html page to .php
[2] Add your PHP code snippet into the HTML page source code anywhere you want it to appear
[3] Lastly, change the links of the other pages to go to the .php page instead of the old, .html page.
__________________
Reid Workman - Web Design and Development - Currently Working on a Freelance Job search: PM me if you are interesting in testing it.
mwsource is offline
Reply With Quote
View Public Profile Visit mwsource's homepage!
 
Old 10-16-2009, 03:16 PM Re: PHP Script to HTML Site?
Novice Talker

Posts: 5
Name: SwzMaster
Trades: 0
do u mean about : make function from some php file and call them from html file?
__________________
Software Library | SoftwZone Blog
SoftwZone is offline
Reply With Quote
View Public Profile
 
Old 10-16-2009, 04:19 PM Re: PHP Script to HTML Site?
Skilled Talker

Posts: 91
Name: Sidney shieldon
Trades: 0
Do you want to put PHP script to a HTML site? Is that what you want to do ?
infotech rules is offline
Reply With Quote
View Public Profile
 
Old 10-16-2009, 05:53 PM Re: PHP Script to HTML Site?
mwsource's Avatar
Skilled Talker

Posts: 59
Name: Reid
Location: Georgia, USA
Trades: 0
I think flek disappeared after he figured it out XD
__________________
Reid Workman - Web Design and Development - Currently Working on a Freelance Job search: PM me if you are interesting in testing it.
mwsource is offline
Reply With Quote
View Public Profile Visit mwsource's homepage!
 
Old 11-03-2009, 06:58 PM Re: PHP Script to HTML Site?
Experienced Talker

Posts: 34
Trades: 0
Quote:
Originally Posted by mwsource View Post
I think flek disappeared after he figured it out XD
Hi friend, the issue is over. That's why didn't reply. I tried first with a php contact form and it worked well, but still my actual plan is in pending - the contact form can be found at www newgenresoft.com/seoblog/?page_id=17

Thanks for the good replies
__________________
Free SEO Guides from SEO Experts * Use 'Bounce Back SEO' for SEO Services

Get Free Oneway Backlinks Submit your websites to Online Business Directory

Last edited by chrishirst; 11-04-2009 at 04:15 AM..
flek is offline
Reply With Quote
View Public Profile Visit flek's homepage!
 
Reply     « Reply to PHP Script to HTML Site?
 

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.14962 seconds with 13 queries