Results 1 to 6 of 6
  1. #1
    slanluc is offline Junior
    Join Date
    Aug 2011
    Posts
    192
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default php, how to call a php file from a html file

    I am wondering if you can help me.

    I have a simple html site and I need to include a php file into html site.

    The php file is infact a form.

    thanx

  2. #2
    susen is offline Freshman
    Join Date
    Apr 2010
    Posts
    38
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    The only way to use JavaScript to redirect the page to the PHP file.

  3. #3
    kristy85 is offline Freshman
    Join Date
    May 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    I've designed a html webpage in dreamweaver. And I've also done the php coding in a separate .php file. In my html page, I used <form action="file.php" method="post"> so, why doesn't the php work? Is there any way where I can retrieve values from textbox without using get or post or session? How can I do that?

  4. #4
    susen is offline Freshman
    Join Date
    Apr 2010
    Posts
    38
    Thanks
    0
    Thanked 1 Time in 1 Post
    Feedback Score
    0

    Default

    The "action" property actually define the page that will handle the submitted data, GET or POST. When you submit the form the HTML page will be redirected to the action url. So without submitted data it is same as clicking a link to open the page "file.php".
    You only can retrieve data by using GET or POST. But if you require not to reload the current page you can do it in two ways.
    1. Using AJAX technology;
    2. Using iFrame.
    The following two articles will be helpful for you.
    Ajax post data example and AJAX file upload using iframe

  5. #5
    web
    web is offline Freshman
    Join Date
    Dec 2011
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    use:
    include("file.php");
    require("file.php");
    <form name="input" action="file.php" method="post"> ... </form>

  6. #6
    jassmee is offline Sophomore
    Join Date
    Mar 2012
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    you are call the php filein html file throught link. and you may call php file in php file throught include() ...

Similar Threads

  1. dl file to db
    By slanluc in forum Web Development - Programming & Coding
    Replies: 0
    Last Post: 10-09-2011, 02:50 AM
  2. Replies: 5
    Last Post: 01-07-2011, 04:58 AM
  3. ROR file for SEO, What is ROR?
    By mastermind in forum Search Engine Optimization
    Replies: 6
    Last Post: 06-14-2010, 03:32 AM
  4. How to find a pdf file is normal file or shared review file
    By sunshine in forum JavaScript & AJAX
    Replies: 0
    Last Post: 01-04-2010, 11:21 AM
  5. HTML sitemap and XML Sitemap file
    By laster001 in forum Search Engine Optimization
    Replies: 9
    Last Post: 06-29-2009, 05:47 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Partners: BOSTON WEB DEVELOPER, LLC   |   WEBCOSMO CLASSIFIEDS