I want to get the Max userID from tblLogin and add 1   

This value i want to put into a string to insert into the table

```
$sql2="INSERT INTO tblLogin (Gebruikersnaam, Wachtwoord, UserID)
VALUES ('$_POST[gebruikersnaam]','$_POST[wachtwoord]', 'SELECT MAX(tblLogin.UserID) FROM tblLogin')";

```

I want to insert another row with the UserID then being the max one (5) + 1 so 6   

**However if i try this with the code i have now
it just adds 1 instead of 6**

It looks like it takes the value as 0 and i don't know why.

The 'Gebruikersnaam' (it's dutch :p) and 'Wachtwoord' are being inserted fine.
Only the UserID gives an issue.

Help.