Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-02-17
5
Medium Priority
?
395 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 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

722 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