Url change hidden variable and submit form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mostafaz4
    New Member
    • Nov 2012
    • 6

    Url change hidden variable and submit form

    I have a form in php file
    Code:
    <form action="index.php" method="post">
    <input type="hidden" name="hvalue" value="123">
    </form>
    i want to edit variable "hvalue" and submit the form through an url like
    "http://website.com/index.php?hvalu e=456&action=su bmit"
    Last edited by Meetee; Nov 8 '12, 08:15 AM. Reason: code tags added
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    change post to get.

    Comment

    • mostafaz4
      New Member
      • Nov 2012
      • 6

      #3
      i cant modify it, because im not the hoster

      have you alternative way to do that without changing the source?
      All i want to change the variable and submit the form automatically

      Sorry for my bad english

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        i cant modify it, because im not the hoster
        then what can you modify?

        Comment

        • sharmahemal
          New Member
          • Jul 2012
          • 19

          #5
          u cant modify it. because u use not a local server but use
          web server

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            If I had the appropriate rights on a web server, I could modify those’s files to my liking.

            Comment

            • sharmahemal
              New Member
              • Jul 2012
              • 19

              #7
              ok. question misunderstandin g

              Comment

              • mostafaz4
                New Member
                • Nov 2012
                • 6

                #8
                Well, this form in a website and i want to change the hidden variable in that form then submit it using a PHP page
                I want that to be done with one single step like "url or simple script" because it will be part of automated script.

                Any ideas ??

                *Sorry for late response

                Comment

                • sharmahemal
                  New Member
                  • Jul 2012
                  • 19

                  #9
                  u will use ajax for that because ajax is mostly use for that

                  Comment

                  • mostafaz4
                    New Member
                    • Nov 2012
                    • 6

                    #10
                    could you help me doing this script using AJAX ??

                    Comment

                    • Rabbit
                      Recognized Expert MVP
                      • Jan 2007
                      • 12517

                      #11
                      That form is in the PHP file, if you can't change the PHP file, then you can't change the form.

                      Comment

                      • mostafaz4
                        New Member
                        • Nov 2012
                        • 6

                        #12
                        NOOOOOO, I won't change the source ...
                        I just want to do some steps automatically without humanitarian intervention

                        Something like "Marco", I click one link on a php file i host
                        and it do the rest for me.

                        The rest is:
                        1. Navigate to another website [i don't host]
                        2. Submit a form [with method post] and i couldn't change it because i don't host it

                        This script would be a part of automated script

                        Hope i describe it well.
                        *Sorry for my bad english

                        Comment

                        • Dormilich
                          Recognized Expert Expert
                          • Aug 2008
                          • 8694

                          #13
                          write the form code as you want it and submit it to the desired address. where the code came from does not matter to the receiving PHP script.

                          example
                          Code:
                          // foreign website (example.org) offers following form
                          <form action="index.php" method="post">
                          <input type="hidden" name="hvalue" value="123">
                          </form>
                          
                          // I can rewrite that locally to
                          <form action="http://example.org/index.php" method="post">
                          <input type="hidden" name="hvalue" value="abc">
                          <input type="hidden" name="vvalue" value="567">
                          </form>
                          // and submit it
                          // whether the result will differ, is another problem
                          Last edited by Dormilich; Nov 12 '12, 01:20 PM.

                          Comment

                          • mostafaz4
                            New Member
                            • Nov 2012
                            • 6

                            #14
                            Yeah great work, it works but i could't submit it automatically
                            This script require me to click on a button to submit the form

                            I want to submit it automatically, without humanitarian intervention
                            Like you enter "http://website.com" and it redirects you to "http://anotherwebsite. com" but with the form submitted

                            OR Could i get the source code of the submitted form from the original website also without humanitarian intervention?

                            *Thanks for your interest
                            *Sorry for annoying

                            Comment

                            • Dormilich
                              Recognized Expert Expert
                              • Aug 2008
                              • 8694

                              #15
                              I want to submit it automatically
                              how about form.submit();

                              Comment

                              Working...