Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

916 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