Loading ...
Sorry, an error occurred while loading the content.

Re: [php4india] {Query} Page not displaying while connecting from HTML to PHP

Expand Messages
  • Naresh Kumar
    *************************************************************************************************** Dear Debadarshy Dash, You have to specify exat php file
    Message 1 of 10 , May 31, 2006
    • 0 Attachment
      Debadarshy Dash <debadarshy.php@...> wrote:
      hi guys
         i am very new to php.currently i am facing some problem while i am accessin a PHP fil from HTML form.
      here is the code and result.
       
      The HTML File
      example.html
      <html>
      <head>
      <title>Listing 9.2 A simple HTML form</title>
      </head>
      <body>
      <form action="1x.php" method="GET">
      <input type="text" name="user">
      <br>
      <textarea name="address" rows="5" cols="40">
      </textarea>
      <br>
      <input type="submit" value="Enter">
      </form>
      </body>
      </html>
      The PHP File
      procesa2.php
      <html>
      <head>
      <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
      </head>
      <body>
      <?php
      echo("Welcome <b>$user</b><P>\n\n");
      echo("Your address is:<P>\n\n<b>$address</b>");
      ?>
      </body>
      </html>
      after submitting the details in the HTML form it should show me "Welcome then user name" and same for the address
      but hitting the enter button it's showing me the page with the given php script.
      so please let me know what to do for the same.
      Regards
      Dev
       
      ***************************************************************************************************
      Dear Debadarshy Dash,
       
       You have to specify exat php file name in html form action event that is    <form action="procesa2.php" method="GET"> insted of
      <form action="1x.php" method="GET">
       
      hope this would solve your prob - Naresh Kumar


      Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice.

    • Antony juliston
      Rewrite the code as below and try. The HTML File example.html Listing 9.2 A simple HTML form
      Message 2 of 10 , Jun 1, 2006
      • 0 Attachment

        Rewrite the code as below and try.

        The HTML File
        example.html
        <html>
        <head>
        <title>Listing 9.2 A simple HTML form</title>
        </head>

        <form action="procesa2.php " method="GET">
        <input type="text" name="user">
        <br>
        <textarea name="address" rows="5" cols="40">
        </textarea>
        <br>
        <input type="submit" value="Enter">
        </form>

        </html>
        The PHP File
        procesa2.php
        <html>
        <head>
        <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
        </head>

        <?php
        echo "Welcome <b>".$_REQUEST['user']."</b><P>\n\n";
        echo "Your address is:<P>\n\n<b>".$_REQUEST['address']."</b>";
        ?>

        </html>


        regards
        juliston.
        Debadarshy Dash <debadarshy.php@...> wrote:
        hi guys
           i am very new to php.currently i am facing some problem while i am accessin a PHP fil from HTML form.
        here is the code and result.
         
        The HTML File
        example.html
        <html>
        <head>
        <title>Listing 9.2 A simple HTML form</title>
        </head>
        <body>
        <form action="1x.php" method="GET">
        <input type="text" name="user">
        <br>
        <textarea name="address" rows="5" cols="40">
        </textarea>
        <br>
        <input type="submit" value="Enter">
        </form>
        </body>
        </html>
        The PHP File
        procesa2.php
        <html>
        <head>
        <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
        </head>
        <body>
        <?php
        echo("Welcome <b>$user</b><P>\n\n");
        echo("Your address is:<P>\n\n<b>$address</b>");
        ?>
        </body>
        </html>
        after submitting the details in the HTML form it should show me "Welcome then user name" and same for the address
        but hitting the enter button it's showing me the page with the given php script.
        so please let me know what to do for the same.
        Regards
        Dev
         
         


        Yahoo! India Answers: Share what you know. Learn something new Click here
        Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

      • AAAA Pawan Pandey
        it seems you are reaching to the right page after Entering, but you have provided wrong action in the form provided here (mistakingly).... You have to
        Message 3 of 10 , Jun 1, 2006
        • 0 Attachment
          it seems you are reaching to the right page after Entering, but you have provided wrong action in the form provided here (mistakingly)....

          You have to properly setup the webserver for reading php scripts...

          Regards,
          Pawan

          Debadarshy Dash <debadarshy.php@...> wrote:
          hi guys
             i am very new to php.currently i am facing some problem while i am accessin a PHP fil from HTML form.
          here is the code and result.
           
          The HTML File
          example.html
          <html>
          <head>
          <title>Listing 9.2 A simple HTML form</title>
          </head>
          <body>
          <form action="1x.php" method="GET">
          <input type="text" name="user">
          <br>
          <textarea name="address" rows="5" cols="40">
          </textarea>
          <br>
          <input type="submit" value="Enter">
          </form>
          </body>
          </html>
          The PHP File
          procesa2.php
          <html>
          <head>
          <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
          </head>
          <body>
          <?php
          echo("Welcome <b>$user</b><P>\n\n");
          echo("Your address is:<P>\n\n<b>$address</b>");
          ?>
          </body>
          </html>
          after submitting the details in the HTML form it should show me "Welcome then user name" and same for the address
          but hitting the enter button it's showing me the page with the given php script.
          so please let me know what to do for the same.
          Regards
          Dev
           
           


          Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.

        • satheesh kumar
          hai dash, i saw ur code. In HTML u didnt place the body tag. that is a problem. Listing 9.2 A simple HTML form
          Message 4 of 10 , Jun 1, 2006
          • 0 Attachment

            hai dash,

              i saw ur code. In HTML u didnt place the body tag. that is a problem.
            <html>
            <head>
            <title>Listing 9.2 A simple HTML form</title>
            </head>
            <body>
            <form action="sample.php" method="GET">
            <input type="text" name="user">
            <br>
            <textarea name="address" rows="5" cols="40">
            </textarea>
            <br>
            <input type="submit" value="Enter">
            </form>
            </body>

            </html>

            The PHP file is

            <?php
            echo("Welcome <b>$user</b><P>\n\n");
            echo("Your address is:<P>\n\n<b>$address</b>");
            ?>



            Yahoo! India Answers: Share what you know. Learn something new Click here
            Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now
          • dharma rajan
            Hi... The Code Is working very fine ... just check theprocesa2.php file location where it is located okay ... Suppose the path will be the problem .. And also
            Message 5 of 10 , Jun 1, 2006
            • 0 Attachment
              Hi...
               
               
               
               The Code Is working very fine ...
              just check theprocesa2.php file location where it is located okay ...
              Suppose the path will be the problem .. And also another thing if u have install the php.
              U should keep the php file in the wwwroot directory okay
              The html Flie and Php file also should be in the same directory okay..
               
               
                 Check the path where it is located .. okay
               
               
              by
              friend
               
               


              Yahoo! India Answers: Share what you know. Learn something new Click here
              Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

            • lachhekumar KumarKumar
              Try this code in PHP .. It will display you the page ... procesa2.php Listing 9.3 Reading input from the form in Listing 9.2
              Message 6 of 10 , Jun 1, 2006
              • 0 Attachment

                Try this code in PHP .. It will display you the page

                :)


                procesa2.php

                <html>
                <head>
                <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
                </head>
                <body>
                <?
                echo("Welcome <b>$user</b><P>\ n\ n");
                echo("Your address is:<P>\ n\ n<b>$address</b>");
                ?>
                </body>
                </html>





                Yours

                kumar



                ----- Original Message ----
                From: Debadarshy Dash <debadarshy.php@...>
                To: php4india@yahoogroups.com
                Sent: Wednesday, 31 May, 2006 11:13:36 PM
                Subject: [php4india] Page not displaying while connecting from HTML to PHP

                hi guys
                   i am very new to php.currently i am facing some problem while i am accessin a PHP fil from HTML form.
                here is the code and result.
                 
                The HTML File
                example.html

                <html>
                <head>
                <title>Listing 9.2 A simple HTML form</title>
                </head>
                <body>
                <form action="1x.php" method="GET">
                <input type="text" name="user">
                <br>
                <textarea name="address" rows="5" cols="40">
                </textarea>
                <br>
                <input type="submit" value="Enter">
                </form>
                </body>
                </html>

                The PHP File

                procesa2.php

                <html>
                <head>
                <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
                </head>
                <body>
                <?php
                echo("Welcome <b>$user</b><P>\ n\ n");
                echo("Your address is:<P>\ n\ n<b>$address</b>");
                ?>
                </body>
                </html>

                after submitting the details in the HTML form it should show me "Welcome then user name" and same for the address

                but hitting the enter button it's showing me the page with the given php script.

                so please let me know what to do for the same.

                Regards

                Dev

                 

                 



                http://www.phpforu.com



                SPONSORED LINKS
                Php developer Design


                YAHOO! GROUPS LINKS



              • Debadarshy Dash
                hi nresh unfortunately i wrote the name of the file wrong...actually i.e 1x.php. so with that how can i solve my problem. here is the modified one. *The HTML
                Message 7 of 10 , Jun 1, 2006
                • 0 Attachment
                  hi nresh
                      unfortunately i wrote the name of the file wrong...actually i.e 1x.php.
                  so with that how can i solve my problem.
                  here is the modified one.
                  The HTML File
                  example.html
                  <html>
                  <head>
                  <title>Listing 9.2 A simple HTML form</title>
                  </head>
                  <body>
                  <form action="1x.php" method="GET">
                  <input type="text" name="user">
                  <br>
                  <textarea name="address" rows="5" cols="40">
                  </textarea>
                  <br>
                  <input type="submit" value="Enter">
                  </form>
                  </body>
                  </html>
                  The PHP File
                  1x.php
                  <html>
                  <head>
                  <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
                  </head>
                  <body>
                  <?php
                  echo("Welcome <b>$user</b><P>\n\n");
                  echo("Your address is:<P>\n\n<b>$address</b>");
                  ?>
                  </body>
                  </html>
                   
                  Regards
                  Dev

                   
                  On 6/1/06, Naresh Kumar <vikunth777@...> wrote:


                  Debadarshy Dash <debadarshy.php@...> wrote:
                  hi guys
                     i am very new to php.currently i am facing some problem while i am accessin a PHP fil from HTML form.
                  here is the code and result.
                   
                  The HTML File
                  example.html
                  <html>
                  <head>
                  <title>Listing 9.2 A simple HTML form</title>
                  </head>
                  <body>
                  <form action="1x.php" method="GET">
                  <input type="text" name="user">
                  <br>
                  <textarea name="address" rows="5" cols="40">
                  </textarea>
                  <br>
                  <input type="submit" value="Enter">
                  </form>
                  </body>
                  </html>
                  The PHP File
                  procesa2.php
                  <html>
                  <head>
                  <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
                  </head>
                  <body>
                  <?php
                  echo("Welcome <b>$user</b><P>\n\n");
                  echo("Your address is:<P>\n\n<b>$address</b>");
                  ?>
                  </body>
                  </html>
                  after submitting the details in the HTML form it should show me "Welcome then user name" and same for the address
                  but hitting the enter button it's showing me the page with the given php script.
                  so please let me know what to do for the same.
                  Regards
                  Dev
                   
                  ***************************************************************************************************
                  Dear Debadarshy Dash,
                   
                   You have to specify exat php file name in html form action event that is    <form action="procesa2.php" method="GET"> insted of
                  <form action="1x.php" method="GET">
                   
                   
                  hope this would solve your prob - Naresh Kumar


                  Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice.

                  http://www.phpforu.com



                  SPONSORED LINKS
                  Php developer Design


                  YAHOO! GROUPS LINKS




                • Debadarshy Dash
                  unfortunately i wrote the name of the file wrong... i am getting perfect result if i am using direct php file rater using anything through HTML forms. so
                  Message 8 of 10 , Jun 1, 2006
                  • 0 Attachment
                    unfortunately i wrote the name of the file wrong...
                    i am getting perfect result if i am using direct php file rater using anything through HTML forms.
                    so please guide me is there anything wrong with my web server.as the request_method is "GET"
                     
                    Regards
                    dev

                     
                    On 6/1/06, Antony juliston <juliston_vr@...> wrote:

                    Rewrite the code as below and try.

                    The HTML File
                    example.html
                    <html>
                    <head>
                    <title>Listing 9.2 A simple HTML form</title>
                    </head>

                    <form action="procesa2.php" method="GET">

                    <input type="text" name="user">
                    <br>
                    <textarea name="address" rows="5" cols="40">
                    </textarea>
                    <br>
                    <input type="submit" value="Enter">
                    </form>

                    </html>
                    The PHP File
                    procesa2.php
                    <html>
                    <head>
                    <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
                    </head>

                    <?php
                    echo "Welcome <b>".$_REQUEST['user']."</b><P>\n\n";
                    echo "Your address is:<P>\n\n<b>".$_REQUEST['address']."</b>";
                    ?>

                    </html>


                    regards
                    juliston.

                    Debadarshy Dash <debadarshy.php@...> wrote:
                    hi guys
                       i am very new to php.currently i am facing some problem while i am accessin a PHP fil from HTML form.
                    here is the code and result.
                     
                    The HTML File
                    example.html
                    <html>
                    <head>
                    <title>Listing 9.2 A simple HTML form</title>
                    </head>
                    <body>
                    <form action="1x.php" method="GET">
                    <input type="text" name="user">
                    <br>
                    <textarea name="address" rows="5" cols="40">
                    </textarea>
                    <br>
                    <input type="submit" value="Enter">
                    </form>
                    </body>
                    </html>
                    The PHP File
                    procesa2.php
                    <html>
                    <head>
                    <title>Listing 9.3 Reading input from the form in Listing 9.2</title>
                    </head>
                    <body>
                    <?php
                    echo("Welcome <b>$user</b><P>\n\n");
                    echo("Your address is:<P>\n\n<b>$address</b>");
                    ?>
                    </body>
                    </html>
                    after submitting the details in the HTML form it should show me "Welcome then user name" and same for the address
                    but hitting the enter button it's showing me the page with the given php script.
                    so please let me know what to do for the same.
                    Regards
                    Dev
                     
                     


                    Yahoo! India Answers: Share what you know. Learn something new Click here
                    Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

                    http://www.phpforu.com



                    SPONSORED LINKS
                    Php developer Design


                    YAHOO! GROUPS LINKS




                  • Dev
                    hi satheesh i used the following code given by you..... but it gave the error given below. Notice: Undefined variable: user in c: program files apache
                    Message 9 of 10 , Jun 1, 2006
                    • 0 Attachment
                      hi satheesh
                      i used the following code given by you.....
                       
                      but it gave the error given below.
                       
                      Notice: Undefined variable: user in c:\program files\apache group\Apache\htdocs\sample.php on line 2
                      Welcome


                      Notice: Undefined variable: address in c:\program files\apache group\Apache\htdocs\sample.php on line 3
                      Your address is:

                       
                      do let me know what else i have to do.
                      Regards
                      Dev

                      From: php4india@yahoogroups.com [mailto:php4india@yahoogroups.com] On Behalf Of satheesh kumar
                      Sent: Thursday, June 01, 2006 1:54 PM
                      To: php4india@yahoogroups.com
                      Subject: Re: [php4india] Page not displaying while connecting from HTML to PHP


                      hai dash,

                        i saw ur code. In HTML u didnt place the body tag. that is a problem.
                      <html>
                      <head>
                      <title>Listing 9.2 A simple HTML form</title>
                      </head>
                      <body>
                      <form action="sample.php" method="GET">
                      <input type="text" name="user">
                      <br>
                      <textarea name="address" rows="5" cols="40">
                      </textarea>
                      <br>
                      <input type="submit" value="Enter">
                      </form>
                      </body>

                      </html>

                      The PHP file is

                      <?php
                      echo("Welcome <b>$user</b><P>\n\n");
                      echo("Your address is:<P>\n\n<b>$address</b>");
                      ?>



                      Yahoo! India Answers: Share what you know. Learn something new Click here
                      Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

                    Your message has been successfully submitted and would be delivered to recipients shortly.