Solved

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

Posted on 2011-02-17
5
394 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:cataleptic_state
ID: 34921944
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
ID: 34921967
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
ID: 34922112
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
ID: 34923337
PHP is not installed
0
 
LVL 5

Expert Comment

by:onemadeye
ID: 34929244
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

636 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