DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Location
    Hong Kong
    Posts
    2

    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!!

  2. #2
    Join Date
    Oct 2006
    Posts
    5
    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.

  3. #3
    Join Date
    Apr 2006
    Location
    Zagreb, Croatia
    Posts
    152
    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

  1. open connection to excel from a webpage
    By fareeda in forum Web
    Replies: 1
    Last Post: 06-26-2002, 07:21 PM
  2. open connection to excel from a webpage
    By fareeda in forum ASP.NET
    Replies: 1
    Last Post: 06-26-2002, 02:59 PM
  3. Adding fields to an open recordset
    By Jason West in forum VB Classic
    Replies: 2
    Last Post: 09-12-2001, 03:30 PM
  4. Replies: 4
    Last Post: 03-29-2000, 11:39 PM
  5. Replies: 0
    Last Post: 03-18-2000, 01:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links