How do we generate the bitcoin address for every user, those who uses our website
Generating a new address for our site should be a backend process. Let me explain how it should be done.
1.-User input his Username, Mail and Password to create the account.
2.-The data is sent to the backend.
3.-The data is verified in the backend to see if its valid before write it in the DB
4.-If the data is valid, then call your bitcoin node with RCP to get the new address and send that info to the users array.
5.-Write In the data base: ID, Username, Password(encripted), mail, balance, address...
Then each time the user request the address you can fill that input with a SQL call.
and can withdraw deposit ?
For withdrawals:
1.-User input the withdrawal amount and the address.
2.-The data is sent to the backend
3.-Data verification (If the balance is enough if the sending address is valid...)
4.-Send the transaction with RPC calls.
5.-Update the Data Base with the new balance, and record the withdrawal transaction on a new table.
Since you are talking about website development i would like to recommend NodeJS for a crypto application as a backend.