Beginner problem

Hello:

Supose You have an HTML file (a form) with a textbox and a command button ("Send" button).

The form tag has an Action=http.../url/cgi.cgi" statement.

Te user inputs something in the textbox, presses "send" and voila!.. It's sent.

How can I do exactly the same (send a message) to that cgi (or that URL) automatically without filling the form.... is this possible?
Can I maybe add parameters to the Url?

Did I explain well?

Thanks
LVL 2
trilloAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

trilloAuthor Commented:
Edited text of question.
0
chensuCommented:
http.../url/cgi.cgi?para1=value1&para2=value2

para1, para2 are the parameter names and value1, value2 are the values that the user enters.
0
jhurstCommented:
It would be better to do something like:
<form name=firstForm action=whatever>
<input type=hidden name=parameter1 value='whatever'>
<input type=hidden name=parameter2 value='whatever'>
<input type=submit>
</form>

Or even, skip the <input type=submit> and use some Javascript of the form:
<body onLoad=firstForm.submit()>

My method is safer because it works whether the form is submitted by either a GET or a POST and also allows for some parameters to be added as user inputs in the form.

The 'append parameters to URL' method works only for scripts that are accepting GET type posts and it is already recommended that these be phased out and replaced by POST actions.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

trilloAuthor Commented:
Sorry, I had to give you more information, but I know very little of CGI, but I know a lot of VC++ and VB (if this helps)

This is my problem: I have a form with some textboxes, the user fills them and clicks "Send". This form uses the POST method!!!

I want to automate this, with C++ or VB. I would like to "fill" virtually the form and virutally "press" the send button.... Actually I don't even want to open the HTML page... I's like to send just a string or open an URL with the rigth parameters.

Chensu's answer was right, and also jhurst's.... Actually Chensu's answer was the one I was looking for, but you're ritght, it does not work with POST methods....
What can I do?
0
chensuCommented:
Are you writing a Windows application? Are you using WinInet API functions? If you answer "yes" for both questions, I have got the answer.
0
trilloAuthor Commented:
YEEEEEES
0
chensuCommented:
HOWTO: Simulate a Form POST Request Using WinInet
http://support.microsoft.com/support/kb/articles/Q165/2/98.ASP
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
trilloAuthor Commented:
Well, well, well....
You just made my application send a pager message (by posting the Pin and the message itself to a CGI somwhere on the Internet!!)
Thanks a lot!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.