HTML method

Get help on web editors (Frontpage, Dreamweaver) and web languages (HTML, ASP, PHP).
Post Reply
SBSP
Registered User
Posts: 3124
Joined: 09 May 2006, 02:00
Location: Centurion

HTML method

Post by SBSP »

hi I'm learning PHP.

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>
Note i know i'm not supposed to call the above code index.php as its a standard html file, and should rather call it index.htm.


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
But before i navigate to login.htm i want to have a string that builds the login.htm then write it to file
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>
[/code]

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.

??
Post Reply