PHP form that doesn't require a submit button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chazzy69
    New Member
    • Sep 2007
    • 196

    PHP form that doesn't require a submit button

    is it possible to send information without having to use a php form i.e. say the information that you would put in the form is made as a sort of message that can be posted automatically without waiting for user input??

    Note: this is not related to any other post by me

    Thanks in advance, any help is appreciated
  • realin
    Contributor
    • Feb 2007
    • 254

    #2
    There is nothing called phpform and btw i couldn't understand what you mean to say. not even near to it ..

    You want the form to be submitted without user input ? then why do u need the form to be submitted. If you want the form to be submitted without clicking on any button, then you can perform this process using events, as soon as the input boxes are getting some data. Validate the data (using js+ajax) and when the last gets inputed, check the other ones (which are mandatory for valid data) and process the data using ajax :)

    that was the vague idea of what u wanted ..

    hope this helps
    cheers !!

    Comment

    • chazzy69
      New Member
      • Sep 2007
      • 196

      #3
      Ok i will atempt to explain it a bit better;

      I know that a html from can post information to a .php page i use it regurly anyhow what i what is to be to post information from a .php page that is send certain varibles through a string to this other page.

      Hope this makes more sense

      Thanks,

      Comment

      • realin
        Contributor
        • Feb 2007
        • 254

        #4
        Originally posted by chazzy69
        Ok i will atempt to explain it a bit better;

        I know that a html from can post information to a .php page i use it regurly anyhow what i what is to be to post information from a .php page that is send certain varibles through a string to this other page.

        Hope this makes more sense

        Thanks,
        use hidden fields inside form tag or use cookies, sessions whatever u feel is good ..

        cheers !!

        Comment

        • chazzy69
          New Member
          • Sep 2007
          • 196

          #5
          i don't what to use a form as it requires a physical click on the submit button to post the information what im looking for is a PHP function that enables me to send varibles via this function to another URL and also i need the necessary PHP function required to recieve such communication.

          I hope i cleared this up a little bit;

          Thanks,

          Comment

          • Muddasir
            New Member
            • Jun 2007
            • 49

            #6
            hi
            try using header("locatio n:abc.php?usern ame=xyz");

            Regards

            Comment

            • chazzy69
              New Member
              • Sep 2007
              • 196

              #7
              Thanks ill give it a go

              Comment

              • developing
                New Member
                • Mar 2007
                • 110

                #8
                okay...first clear up your grammer. it is very hard to understand what you mean

                make a js function that has lines that look something like 'document.formN ame.submit()'

                and call that function as soon as the user has entered the last piece of information you want them to enter

                Comment

                • Markus
                  Recognized Expert Expert
                  • Jun 2007
                  • 6092

                  #9
                  No idea what's going on in this thread.

                  OP (original poster), unfortunately I feel a little silly because I'm not grasping what it is you're trying to accomplish; this is through no fault of your own. I'm just not with it right now.

                  Anyway, what I have managed to grasp, the solution could be simply using $_SESSIONs to pass around your data.

                  You say 'form' but then you don't want user input? Is there any need for a form then?

                  Maybe you could give me (us) an example?

                  Cheers!

                  Comment

                  • Markus
                    Recognized Expert Expert
                    • Jun 2007
                    • 6092

                    #10
                    Originally posted by developing
                    okay...first clear up your grammer. it is very hard to understand what you mean

                    make a js function that has lines that look something like 'document.formN ame.submit()'

                    and call that function as soon as the user has entered the last piece of information you want them to enter
                    Grammer?

                    I'm sure you mean 'Grammar', good sir.

                    (read: self-pwn)

                    Comment

                    • developing
                      New Member
                      • Mar 2007
                      • 110

                      #11
                      lol yeah...thats what i meant

                      Comment

                      • chazzy69
                        New Member
                        • Sep 2007
                        • 196

                        #12
                        Sorry for implying that a form is actually required for this, NO. Nothing to do with user input and again sorry if i implied this.

                        Need a function or some such, that with i can send a varible or two from one php page to another and have the other receive it.

                        I actually manged to stumble across what maybe a solution to my quesiton just gotta test it -

                        Code:
                        string http_post_data ( string $url [, string $data [, array $options [, array &$info ]]] )
                        Thanks for help and sorry if im a little hard to understand,

                        Comment

                        • chazzy69
                          New Member
                          • Sep 2007
                          • 196

                          #13
                          Ok that didn't actually turn to be a function, still open to any ideas thanks

                          Comment

                          • chazzy69
                            New Member
                            • Sep 2007
                            • 196

                            #14
                            Originally posted by Muddasir
                            hi
                            try using header("locatio n:abc.php?usern ame=xyz");

                            Regards
                            I tried this function but got a error that said, Warning: Cannot modify header information - headers already sent by ....

                            Comment

                            • valajio
                              New Member
                              • Jul 2008
                              • 1

                              #15
                              Think i found you a solution!

                              I think what your attempting to do is the same thing im developing on my registration page for mythkillers... like the one of the previous responses... you can set the javascript function to post automatically one the last input field has been entered.... the way i've done this is with javascript and php... a real time form validation script same method can be used to auto post with user clicking sumbit!

                              check it out if you'd like... if you need help let me know...
                              brandon



                              enter username, password, email to see it in action... still not finished with it yet but it is working!

                              it was kind of a pain to figure out but it validates as you type so the function would know if the user was on the last input field....

                              you could set a delay using ajax once the user clicks or tabs to the last input field of 10 seconds... 'most people type that fast' have a please wait... submitting data loading image thingy then bow post the data and return success or somethin!
                              Last edited by valajio; Jul 4 '08, 01:49 AM. Reason: need to add something

                              Comment

                              Working...