Add controls to your form 00:00
Delete last blank row in datagridview 09:26
Browse button 09:42
Create table database 14:21
Add Dataset and relate it with controls 15:37
change columns header text datagridview 20:52
New button 23:16
Format DateTime column in a DataGridView 25:04
Save or update button 26:17
Search button 29:34
Reset button 32:26
Remove button 33:24
Previous button 34:16
Next button 34:48
First button 35:06
Last button 35:25
Close button 35:41
Dim conn As New SqlConnection("Data Source=.;Initial catalog=sports;Integrated Security=True")
Private Sub count_rows()
Dim cmd As New SqlCommand("Select Count(*) From table1", conn)
conn.Open()
Dim count1 As Integer
count1 = Convert.ToString(cmd.ExecuteScalar)
pagerows = Math.Ceiling(count1 / 10)
Label3.Text = pagerows
conn.Close()
End Sub
Private Sub Form5_Load(sender As Object, e As EventArgs) Handles Me.Load
count_rows()
End Sub
Private Sub load_data()
Dim f1 As Integer = Label1.Text * 10 - 10 + 1
Dim t1 As Integer = Label1.Text * 10
Dim cmd As New SqlCommand("Select * From(Select Row_Number() Over (Order By sport) As rownumber,id,name,age,sport,points From table1)tablerow Where rownumber Between " & f1 & "And " & t1 & "", conn)
Dim da As New SqlDataAdapter
da.SelectCommand = cmd
Dim dt As New DataTable
da.Fill(dt)
DataGridView1.DataSource = dt
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Label1.Text = 1
load_data()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
If Label1.Text < pagerows Then
Label1.Text = Label1.Text + 1
load_data()
End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If Label1.Text > 1 Then
Label1.Text = Label1.Text - 1
load_data()
End If
End Sub
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Step by step learn (HTML,PHP and mysql database) with login and logout page with session in PHP
Contents:
Create a new folder website 00:00
Save as a webpage in folder website login.php 00:29
HTML !DOCTYPE Declaration is an "information" to the browser about what document type to expect. 01:04
The html tag represents the root of an HTML document,and close by 01:13
The header element represents a container for introductory content or a set of navigational links. 01:18
meta charset="UTF-8" 01:23
you are telling your browser to use the UTF-8 character encoding, which is a method of converting your typed characters into machine-readable code.
The title tag defines the title of the document 01:39
body contains all the contents of an HTML document. 02:06
The div tag defines a division or a section in an HTML document. 02:56
The h1 tag is used to define HTML heading. 03:13
Add styles to Div "aa" 03:43
Make div in the Center 05:13
Make the text in the center 05:13
The form tag is used to create an HTML form for user input. 06:25
The br tag inserts a single line break.08:04
Add a short hint that describes the expected value of an input field 09:37
Make input fields must be filled out before submitting the form 10:28
OPen XAMPP to create mysql database 11:14
Create database in phpmyadmin 11:59
Create table 12:34
Insert User 13:50
Connect php with database 14:24
Check connection 15:44
Add code php in login page 16:54
Call connect_database file by require 17:14
Start Session 17:41
check if the input username is filled or not null. 17:54
Removes backslashes 18:21
Escapes a string for use in SQL Statements 31:37
check if username exists in mysql database or no 20:05
mysqli_num_rows Returns the number of rows in a recordest 22:03
Store Session Username 22:43
Redirect to index.php Page 23:07
Error message 23:36
Check if session username exists 26:27
Create index page 27:46
Add hyperlink 29:39
Create logout page with destroy or remove session username 29:53#programming_for_everybody
Tags:
How to connect HTML register form to MySQL database with PHP
Login PHP
Admin and user login in PHP
Administrator login php
Registration form in PHP code with validation
PHP admin login
Private Sub DataGridView1_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
For i As Integer = 0 To DataGridView1.Rows.Count - 1
Dim a1 As Double = DataGridView1.Rows(i).Cells(2).Value
Dim b1 As Double = DataGridView1.Rows(i).Cells(3).Value
Dim c1 As Double = a1 + b1
DataGridView1.Rows(i).Cells(4).Value = c1
Next
End Sub
Private Sub DataGridView1_DefaultValuesNeeded(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) Handles DataGridView1.DefaultValuesNeeded
Dim cmd2 As New SqlCommand("Insert into table1(firstname,lastname,username,password,phone,date_birth,gender,image1)Values(@firstname,@lastname,@username,@password,@phone,@date_birth,@gender,@image1)", conn)