Solved

added a php  form action execution html command line within a htm file

Posted on 2011-02-17
5
389 Views
Last Modified: 2012-05-11
If I have a php file called /path/file.php and I want to add a line of code within an existing htm file how would I add that line within the htm file so people can use the form when they visit the htm site? Also, how can I tell if my server supports php files?
0
Comment
Question by:libertyforall2
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:cataleptic_state
Comment Utility
hi, if you do: <?php include "folder/file.php";?> that should call the form page into the HTML.

Your server host can tell you that information if you log into your control panel and look at the package info.
0
 
LVL 5

Accepted Solution

by:
onemadeye earned 500 total points
Comment Utility
Is your server supports PHP then you should be able to find it out by asking the hosting provider OR login to CPanel (or hosting panel) and see if it supports PHP

Or other simply works ... try renaming your index.htm to index.php and access it from browser. If it shows exactly like the html looks then your server should be support PHP.

All your PHP files can be accessed from browser with a HTM extension if you want (with modification in HTACCESS file).

Now... pls check is your server supports PHP first then let us know.

regards...
0
 

Author Comment

by:libertyforall2
Comment Utility
hmmm.... I make a duplicate file and changed it from index.cgi to index.php and it only showed raw code on the webpage.
0
 

Author Closing Comment

by:libertyforall2
Comment Utility
PHP is not installed
0
 
LVL 5

Expert Comment

by:onemadeye
Comment Utility
Hey... as you said you renamed index.cgi to index.php and it only showed raw code on the webpage then your server might support PHP.
To be more sure, try renaming a working HTML file to PHP (not cgi or anything else).

Or try to create a new file name 'whatever.php' and fill this:
<?php phpinfo(); ?>

Open in new window


Access it from browser and let me know...
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now