So i built a website from scratch using PHP editor.
the website is working the index.php page is a Login page.
its a form with 2 boxes a username field and password with a a submit button.
Sample of the code.
Code: Select all
<html>
<body>
<form action="welcome.php" method="post">
Username <input type="text" name="Username" />
Password <input type="password" name="Password" />
<input type="submit" value="Login"/>
</form>
</body>
</html>
I now want to log into the page using a visual basic 6 program. (Ye ye its old but its the only App syntax i know)
I have no idea on how to do this.
So i'm going to load a webbrowser ActiveX onto my VBform
then on load navigate to a local login.htm page.
Code: Select all
Command1_click()
Webbrowser1.navigate app.path & "\login.htm"
End Sub
then navigate to it.
So i can build the htm file so it looks like this
Code: Select all
[code]<html>
<body>
<form action="welcome.php" method="post">
Username <input type="text" name="Username" value="MyUsername" />
Password <input type="password" name="Password" value=MyPassword />
<input type="submit" value="Login"/>
</form>
</body>
</html>
Note the above has the textbox values set to automatically have the username and password in.
This will be an easy task.
is there a way i can use an HTML form other than method="post"
because when i load this form i want it to automatically post and carry the username and password to the next form
in the above code's case 'welcome.php'
I basically want to make the program so it logs into the website automatically and update something on a regular basis.
E.g every 5 mins or so.
or
Any idea how i can my VB code automatically click the login button ?
(WITHOUT using senkeys E.g sendkeys(vbtab) or sendkeys(enter) ect ect.
??