by ruxi
2 replies
  • WEB DESIGN
  • |
I have a html-page (contact.html) and i want to put on that page a contact form (index.php).
I have tried two things.

1) include in contact.html:
<?php include("index.php"); ?>
--> no result, blank page

2) copy the code from index.php in contact.html:
<?php
/*
php code from index.php
*/
?>
--> the code is shown and not the contact form

What is the problem? When I open index.php directly in the browser there is no problem.
#html #php
  • Profile picture of the author pdjsolutions
    Save the contact.html as contact.php

    that should do it... and then you can include the index.php and also do the other option as well.

    Prateek
    {{ DiscussionBoard.errors[1390309].message }}
  • Profile picture of the author VisualWebEffects
    or you can edit your .htaccess file and tell the server to treat html as if it was a php page.

    but as pdjsolutions, changing your page to have a php extension will get it working
    Signature
    VisualWebEffects- Web Application Development, PC Software Development and Identity Design services
    {{ DiscussionBoard.errors[1390361].message }}

Trending Topics