Gary Howard wrote:
       // Buf     := DataEdit.Text;   // commented out this

       // Below is the Only Line I changed in the whole program
 Buf := '"FirstName=Gary&Submit=Submit"'; //this is the only mod

Try it without the double-quotes:
        Buf := 'FirstName=Gary&Submit=Submit';

Note that you do not need the "Submit" part unless your script is expressly looking for it.

     // Have Also tried the below but it does not work either

//Buf := 'type="text" id="FirstName" FirstName="Gary" type="submit" 
name="submit"';

That won't work; the browser distills the necessary information from the HTML form automatically to build the request payload. You can do it manually too like this:

- The "name" attribute of each field is extracted as its Key.
- The "value" attribute of each field is extracted as its Value.
- Each Key and Value string is UrlEncoded individually (separately) and then concatenated together in the format: Key=Value. - All Key=Value pairs are concatenated together, separated by an ampersand sign.

So if your form is:
        <input type="text" name="FirstName" />
        <input type="hidden" name="Foo" value="Bar" />
        <input type="submit" name="Submit" value="Submit" />

then your payload will be:
        FirstName=XXXX&Foo=Bar&Submit=Submit

where "XXXX" represents whatever the user typed in the FirstName field.

        dZ.

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to