HI all i wonsder how i can make a post request from a .php script from with in my applicaton. PAsssing it certian data and getting the request response back to a textbox. Just Like the pic i shown here. I did the layout but i do not how to write the onclick event for send button so it sends the post request. I be happy if any one help me to do that.Thanks
Once you've loaded the URL that you want to submit the form on you can use the below to fill in all the required fields and then click submit.
VB Code:
'WB1 = Webbrowser control
WB1.Document.All("username").Value = "Test" 'enter Test into username field
WB1.Document.All("password").Value = "test" 'add test into password field
WB1.Document.getElementById("Submit").Click 'sumbit the form
Well i do not want to use webbrowser controle . as u see in pic there is not browser controle and data to be filled in webbrowser!! Just send the values to post script and get the output in textbox. :-(
You'll need to use the Winsock control. Attached is an example someone posted on the forum. It should get you started to what you want to achieve.
MAn i want to do simmiler to that but not with its extra thing. I have already used that and the authoer is not helping me with my questions!! so i give up and want to learn in how to make a simple one .That has lots of extra thing that makes me confused!!
i ask the author but he never replies. it is ove 200 lines of code!!! It is not asking for doing the work !! I just do not know what line of code actually execute the post. It should be a few lines not 200 line of code but how u find those few lines of code amount 200 line code when the author does not answer !!
Last edited by tony007; May 7th, 2006 at 04:49 AM.
If you had used the example you would have noticed the POST info is sent by clicking Private Sub cmdSend_Click()
Man u take every thing simple. You think i can not find the onclick event!!loll.Do not u see it is huge code. In php you exacly how the post is get executed but this dam vb is not like that or at lease i can not see it
The example I posted does everything you want (apart from maybe some minor tweaking on your behalf )
What part can you not get working?
Well if u look at my post there u will know . I know it does the job for me but i want to make some changes on it but with that huge code it is difficult !!