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

problem in form submit

Expand Messages
  • pritesh loke
    Hello To all I have one smoll but big problem.I created one form which is my registration. see this code
    Message 1 of 6 , Mar 9, 2007
    • 0 Attachment
      Hello To all
      I have one smoll but big problem.I created one form which is my registration. see this code
      <form method=post>
      <input type=text name=fname />
      <input type=submit name=submit />
      </form>
      <?
      if(isset($_POST[submit]))
      {
      //enter in database
      }
      ?>
      this type of ode mostally i used when i submitting the form but problem is here when any user refresh the page after enter the value the last post value will go in the database.

      pls tell me the solution


      Thank you




      ---------------------------------
      Food fight? Enjoy some healthy debate
      in the Yahoo! Answers Food & Drink Q&A.

      [Non-text portions of this message have been removed]
    • CS Shyam Sundar
      Dude., This is damn simple., Before entering details to DB check if an entry already exists in the database. If it exists dont enter the details., !!! ... --
      Message 2 of 6 , Mar 9, 2007
      • 0 Attachment
        Dude.,

        This is damn simple.,

        Before entering details to DB check if an entry already exists in the
        database.
        If it exists dont enter the details., !!!


        On 09 Mar 2007 05:38:03 -0800, pritesh loke <priteshloke@...> wrote:
        >
        > Hello To all
        > I have one smoll but big problem.I created one form which is my
        > registration. see this code
        > <form method=post>
        > <input type=text name=fname />
        > <input type=submit name=submit />
        > </form>
        > <?
        > if(isset($_POST[submit]))
        > {
        > //enter in database
        > }
        > ?>
        > this type of ode mostally i used when i submitting the form but problem is
        > here when any user refresh the page after enter the value the last post
        > value will go in the database.
        >
        > pls tell me the solution
        >
        > Thank you
        >
        > ---------------------------------
        > Food fight? Enjoy some healthy debate
        > in the Yahoo! Answers Food & Drink Q&A.
        >
        > [Non-text portions of this message have been removed]
        >
        >
        >



        --
        CS Shyam Sundar

        "In our world of game and con: there is always an opponent and there is
        always a victim. The trick: is to know when you're the latter, so you can
        become the former."


        [Non-text portions of this message have been removed]
      • pritesh loke
        Hello my problem is how i clear post data at refresh time not db problems pls give me any idea if you know. Thank you CS Shyam Sundar
        Message 3 of 6 , Mar 9, 2007
        • 0 Attachment
          Hello
          my problem is how i clear post data at refresh time not db problems
          pls give me any idea if you know.
          Thank you

          CS Shyam Sundar <csshyamsundar@...> wrote: Dude.,

          This is damn simple.,

          Before entering details to DB check if an entry already exists in the
          database.
          If it exists dont enter the details., !!!

          On 09 Mar 2007 05:38:03 -0800, pritesh loke <priteshloke@...> wrote:
          >
          > Hello To all
          > I have one smoll but big problem.I created one form which is my
          > registration. see this code
          > <form method=post>
          > <input type=text name=fname />
          > <input type=submit name=submit />
          > </form>
          > <?
          > if(isset($_POST[submit]))
          > {
          > //enter in database
          > }
          > ?>
          > this type of ode mostally i used when i submitting the form but problem is
          > here when any user refresh the page after enter the value the last post
          > value will go in the database.
          >
          > pls tell me the solution
          >
          > Thank you
          >
          > ---------------------------------
          > Food fight? Enjoy some healthy debate
          > in the Yahoo! Answers Food & Drink Q&A.
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >

          --
          CS Shyam Sundar

          "In our world of game and con: there is always an opponent and there is
          always a victim. The trick: is to know when you're the latter, so you can
          become the former."

          [Non-text portions of this message have been removed]








          ---------------------------------
          8:00? 8:25? 8:40? Find a flick in no time
          with theYahoo! Search movie showtime shortcut.

          [Non-text portions of this message have been removed]
        • Vishwanath B
          hi... i think this may help you....while inserting into database u can check the condition whether the value is in database or not.if not then only insert into
          Message 4 of 6 , Mar 9, 2007
          • 0 Attachment
            hi...
            i think this may help you....while inserting into database u can check the condition whether the value is in database or not.if not then only insert into database. and don't give any else condition....

            try this.....

            ok...bye

            ----- Original Message ----
            From: pritesh loke <priteshloke@...>
            To: php_and_mysql@yahoogroups.com; php4india@yahoogroups.com; bang-phpug@yahoogroups.com
            Sent: Friday, March 9, 2007 7:08:03 PM
            Subject: [bang-phpug] problem in form submit













            Hello To all

            I have one smoll but big problem.I created one form which is my registration. see this code

            <form method=post>

            <input type=text name=fname />

            <input type=submit name=submit />

            </form>

            <?

            if(isset($_POST[ submit]))

            {

            //enter in database

            }

            ?>

            this type of ode mostally i used when i submitting the form but problem is here when any user refresh the page after enter the value the last post value will go in the database.



            pls tell me the solution



            Thank you



            ------------ --------- --------- ---

            Food fight? Enjoy some healthy debate

            in the Yahoo! Answers Food & Drink Q&A.



            [Non-text portions of this message have been removed]














            <!--

            #ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;}
            #ygrp-mlmsg table {font-size:inherit;font:100%;}
            #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}
            #ygrp-mlmsg pre, code {font:115% monospace;}
            #ygrp-mlmsg * {line-height:1.22em;}
            #ygrp-text{
            font-family:Georgia;
            }
            #ygrp-text p{
            margin:0 0 1em 0;
            }
            #ygrp-tpmsgs{
            font-family:Arial;
            clear:both;
            }
            #ygrp-vitnav{
            padding-top:10px;
            font-family:Verdana;
            font-size:77%;
            margin:0;
            }
            #ygrp-vitnav a{
            padding:0 1px;
            }
            #ygrp-actbar{
            clear:both;
            margin:25px 0;
            white-space:nowrap;
            color:#666;
            text-align:right;
            }
            #ygrp-actbar .left{
            float:left;
            white-space:nowrap;
            }
            .bld{font-weight:bold;}
            #ygrp-grft{
            font-family:Verdana;
            font-size:77%;
            padding:15px 0;
            }
            #ygrp-ft{
            font-family:verdana;
            font-size:77%;
            border-top:1px solid #666;
            padding:5px 0;
            }
            #ygrp-mlmsg #logo{
            padding-bottom:10px;
            }

            #ygrp-vital{
            background-color:#e0ecee;
            margin-bottom:20px;
            padding:2px 0 8px 8px;
            }
            #ygrp-vital #vithd{
            font-size:77%;
            font-family:Verdana;
            font-weight:bold;
            color:#333;
            text-transform:uppercase;
            }
            #ygrp-vital ul{
            padding:0;
            margin:2px 0;
            }
            #ygrp-vital ul li{
            list-style-type:none;
            clear:both;
            border:1px solid #e0ecee;
            }
            #ygrp-vital ul li .ct{
            font-weight:bold;
            color:#ff7900;
            float:right;
            width:2em;
            text-align:right;
            padding-right:.5em;
            }
            #ygrp-vital ul li .cat{
            font-weight:bold;
            }
            #ygrp-vital a {
            text-decoration:none;
            }

            #ygrp-vital a:hover{
            text-decoration:underline;
            }

            #ygrp-sponsor #hd{
            color:#999;
            font-size:77%;
            }
            #ygrp-sponsor #ov{
            padding:6px 13px;
            background-color:#e0ecee;
            margin-bottom:20px;
            }
            #ygrp-sponsor #ov ul{
            padding:0 0 0 8px;
            margin:0;
            }
            #ygrp-sponsor #ov li{
            list-style-type:square;
            padding:6px 0;
            font-size:77%;
            }
            #ygrp-sponsor #ov li a{
            text-decoration:none;
            font-size:130%;
            }
            #ygrp-sponsor #nc {
            background-color:#eee;
            margin-bottom:20px;
            padding:0 8px;
            }
            #ygrp-sponsor .ad{
            padding:8px 0;
            }
            #ygrp-sponsor .ad #hd1{
            font-family:Arial;
            font-weight:bold;
            color:#628c2a;
            font-size:100%;
            line-height:122%;
            }
            #ygrp-sponsor .ad a{
            text-decoration:none;
            }
            #ygrp-sponsor .ad a:hover{
            text-decoration:underline;
            }
            #ygrp-sponsor .ad p{
            margin:0;
            }
            o {font-size:0;}
            .MsoNormal {
            margin:0 0 0 0;
            }
            #ygrp-text tt{
            font-size:120%;
            }
            blockquote{margin:0 0 0 4px;}
            .replbq {margin:4;}
            -->









            ____________________________________________________________________________________
            Be a PS3 game guru.
            Get your game face on with the latest PS3 news and previews at Yahoo! Games.
            http://videogames.yahoo.com/platform?platform=120121

            [Non-text portions of this message have been removed]
          • CS Shyam Sundar
            Hmmmm., The way to do it according to the HTTP spec (RFC 2187 ) is to generate raw HTTP headers. In PHP:
            Message 5 of 6 , Mar 10, 2007
            • 0 Attachment
              Hmmmm.,

              The way to do it according to the HTTP spec (RFC
              2187<http://www.faqs.org/rfcs/rfc2187.html>)
              is to generate raw HTTP headers.

              In PHP:
              http://www.php.net/manual/en/function.header.php

              * <?
              Header('Cache-Control: no-cache');
              Header('Pragma: no-cache');
              ?>*

              If you want to view the raw headers of your web page - you can use this service:

              http://www.delorie.com/web/headers.html

              Sample HTTP Headers: (for this page)
              *HTTP/1.1 200 OK
              Date: Tue, 29 Oct 2002 19:50:44 GMT
              Server: Apache/1.3.27

              X-Powered-By: PHP/4.2.2
              Cache-Control: no-cache
              Pragma: no-cache
              Connection: close
              Content-Type: text/html
              *
              --
              CS Shyam Sundar

              "In our world of game and con: there is always an opponent and there
              is always a victim. The trick: is to know when you're the latter, so
              you

              can become the former."

              ----------------------------------------------------------------------------------------------------------------------------

              On 3/9/07, pritesh loke <priteshloke@...> wrote:
              >
              > Hello
              > my problem is how i clear post data at refresh time not db problems
              > pls give me any idea if you know.
              > Thank you
              >
              > CS Shyam Sundar <csshyamsundar@... <csshyamsundar%40gmail.com>>
              > wrote: Dude.,
              >
              > This is damn simple.,
              >
              > Before entering details to DB check if an entry already exists in the
              > database.
              > If it exists dont enter the details., !!!
              >
              > On 09 Mar 2007 05:38:03 -0800, pritesh loke <priteshloke@...<priteshloke%40yahoo.com>>
              > wrote:
              > >
              > > Hello To all
              > > I have one smoll but big problem.I created one form which is my
              > > registration. see this code
              > > <form method=post>
              > > <input type=text name=fname />
              > > <input type=submit name=submit />
              > > </form>
              > > <?
              > > if(isset($_POST[submit]))
              > > {
              > > //enter in database
              > > }
              > > ?>
              > > this type of ode mostally i used when i submitting the form but problem
              > is
              > > here when any user refresh the page after enter the value the last post
              > > value will go in the database.
              > >
              > > pls tell me the solution
              > >
              > > Thank you
              > >
              > > ---------------------------------
              > > Food fight? Enjoy some healthy debate
              > > in the Yahoo! Answers Food & Drink Q&A.
              > >
              > > [Non-text portions of this message have been removed]
              > >
              > >
              > >
              >
              > --
              > CS Shyam Sundar
              >
              > "In our world of game and con: there is always an opponent and there is
              > always a victim. The trick: is to know when you're the latter, so you can
              > become the former."
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >
              >
              >
              > ---------------------------------
              > 8:00? 8:25? 8:40? Find a flick in no time
              > with theYahoo! Search movie showtime shortcut.
              >
              > [Non-text portions of this message have been removed]
              >
              >
              >


              [Non-text portions of this message have been removed]
            • pritesh loke
              Hay thank you very much............. CS Shyam Sundar wrote: Hmmmm., The way to do it according to
              Message 6 of 6 , Mar 10, 2007
              • 0 Attachment
                Hay thank you very much.............

                CS Shyam Sundar <csshyamsundar@...> wrote: Hmmmm.,

                The way to do it according to the HTTP spec (RFC
                2187<http://www.faqs.org/rfcs/rfc2187.html>)
                is to generate raw HTTP headers.

                In PHP:
                http://www.php.net/manual/en/function.header.php

                * <?
                Header('Cache-Control: no-cache');
                Header('Pragma: no-cache');
                ?>*

                If you want to view the raw headers of your web page - you can use this service:

                http://www.delorie.com/web/headers.html

                Sample HTTP Headers: (for this page)
                *HTTP/1.1 200 OK
                Date: Tue, 29 Oct 2002 19:50:44 GMT
                Server: Apache/1.3.27

                X-Powered-By: PHP/4.2.2
                Cache-Control: no-cache
                Pragma: no-cache
                Connection: close
                Content-Type: text/html
                *
                --
                CS Shyam Sundar

                "In our world of game and con: there is always an opponent and there
                is always a victim. The trick: is to know when you're the latter, so
                you

                can become the former."

                ----------------------------------------------------------

                On 3/9/07, pritesh loke <priteshloke@...> wrote:
                >
                > Hello
                > my problem is how i clear post data at refresh time not db problems
                > pls give me any idea if you know.
                > Thank you
                >
                > CS Shyam Sundar <csshyamsundar@... <csshyamsundar%40gmail.com>>
                > wrote: Dude.,
                >
                > This is damn simple.,
                >
                > Before entering details to DB check if an entry already exists in the
                > database.
                > If it exists dont enter the details., !!!
                >
                > On 09 Mar 2007 05:38:03 -0800, pritesh loke <priteshloke@...<priteshloke%40yahoo.com>>
                > wrote:
                > >
                > > Hello To all
                > > I have one smoll but big problem.I created one form which is my
                > > registration. see this code
                > > <form method=post>
                > > <input type=text name=fname />
                > > <input type=submit name=submit />
                > > </form>
                > > <?
                > > if(isset($_POST[submit]))
                > > {
                > > //enter in database
                > > }
                > > ?>
                > > this type of ode mostally i used when i submitting the form but problem
                > is
                > > here when any user refresh the page after enter the value the last post
                > > value will go in the database.
                > >
                > > pls tell me the solution
                > >
                > > Thank you
                > >
                > > ---------------------------------
                > > Food fight? Enjoy some healthy debate
                > > in the Yahoo! Answers Food & Drink Q&A.
                > >
                > > [Non-text portions of this message have been removed]
                > >
                > >
                > >
                >
                > --
                > CS Shyam Sundar
                >
                > "In our world of game and con: there is always an opponent and there is
                > always a victim. The trick: is to know when you're the latter, so you can
                > become the former."
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >
                >
                >
                > ---------------------------------
                > 8:00? 8:25? 8:40? Find a flick in no time
                > with theYahoo! Search movie showtime shortcut.
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >

                [Non-text portions of this message have been removed]






                ---------------------------------
                TV dinner still cooling?
                Check out "Tonight's Picks" on Yahoo! TV.

                [Non-text portions of this message have been removed]
              Your message has been successfully submitted and would be delivered to recipients shortly.