-
ShellExecute to open webpage with fields filled?
I am using VC++ 6.0 under WinXP Professional, doing Win32 programming.
I have a PHP file containing an HTML form with some fields in a web server. In my C++ program (which is not in the web server), I could only open the page with fields blanked by using this:
ShellExecute(NULL, "open", "http://XXX.XX.XX.XX/input_info.php", "", "", SW_SHOW);
My question is:
How can I use "ShellExecute" function call to open the browser to open this PHP page with some of the fields filled?
Thanks!!
-
May or may not work (depending on the page) but you could try to specify field values directly in the URL itself. Something like: url.com/page.php?name=value&another=anothervalue.
-
I think what Michel has suggested should work. Basically if you have two fields e.g. Username and Password on your page then your url might look like this: [url]http://www.someurl.com?username=someusername & password=somepasswordname
Now you should write some simple code as part of your page using ASP and simple VB script (or Java or whatever you're using)
<form name="form1" method="post" action="somepage.asp>&ID=2">
<p>User name:
<input name="Username" type="text" value=<%=Request.QueryString("username")%>>
</p>
<p>Password:
<input type="text" name="Password" value=<%=Request.QueryString("password")%> >
</p>
<input type="submit" name="Submit" value="Change">
</p>
</form>
The asp code here is only <%=Request.QueryString("username")%> and
<%=Request.QueryString("password")%>
Last edited by Ivan**; 10-29-2006 at 08:30 AM.
Similar Threads
-
Replies: 1
Last Post: 06-26-2002, 07:21 PM
-
By fareeda in forum ASP.NET
Replies: 1
Last Post: 06-26-2002, 02:59 PM
-
By Jason West in forum VB Classic
Replies: 2
Last Post: 09-12-2001, 03:30 PM
-
By Beck in forum VB Classic
Replies: 4
Last Post: 03-29-2000, 11:39 PM
-
By Beck in forum VB Classic
Replies: 0
Last Post: 03-18-2000, 01:31 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks