You can also post to webpages using the inet control
Where you have a post variable called sql, and obviously an online database set up. This example works fantastic with a php script i have on a server.Code:Private Sub cmdAdd_Click() Dim strUrl As String Dim strFormData As String strUrl = "" strFormData = "sql=SELECT FROM WHERE " Inet1.URL = strUrl Inet1.Execute strUrl, "post", strFormData, "Content-Type: application/x-www-form-urlencoded" End Sub Private Sub Inet1_StateChanged(ByVal State As Integer) Select Case State Case icConnecting Case icConnected Case icRequesting Case icRequestSent Case icReceivingResponse Case icResponseReceived Case icResponseCompleted Dim strTemp As String strTemp = Inet1.GetChunk(128) strTemp = Trim(strTemp) If InStr(1, strTemp, "0:") Then MsgBox "error: " & strTemp Else MsgBox strTemp End If End Select End Sub
Rich




Reply With Quote