DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: ShellExecute to open webpage with fields filled?

  1. #1
    Join Date
    Oct 2006
    Hong Kong

    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?


  2. #2
    Join Date
    Oct 2006
    May or may not work (depending on the page) but you could try to specify field values directly in the URL itself. Something like:

  3. #3
    Join Date
    Apr 2006
    Zagreb, Croatia
    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] & 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")%>>
    <input type="text" name="Password" value=<%=Request.QueryString("password")%> >
    <input type="submit" name="Submit" value="Change">

    The asp code here is only <%=Request.QueryString("username")%> and
    Last edited by Ivan**; 10-29-2006 at 09: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-30-2000, 12:39 AM
  5. Replies: 0
    Last Post: 03-18-2000, 02: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
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center