Solved

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

Posted on 2011-02-17
5
392 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 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What does GoogleTagMgr javascripts below do 5 36
Need HTML output in powershell line by line 3 30
AJAX Wordpress Not Reading Variable 2 32
HTML <font style="color:red"> 9 33
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
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.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

821 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