Safty precaustions while doing html form processiong using javascript, PHP, MySQL
I am not a professional web developer but i love web development as a hobby..
I am a student and i was asked to make an departmental event web site. I need to create a HTML forms for user registration. I am aware of XXS Scripting attack and SQL Injection. But dont know how they exactly work. I am using PHP and MySQL on server side.

I am taking in consideration:
> Not to take empty values.
> Verify that a number field is composed of integer values only.
> Email ID verification. etc..

All this I am doing using RegEx check both on javascript and PHP

Now my question is:
> what are all characters which i should not allow into my database.
> will it be okay if i convert < and > with there & lt; and & gt; alternatives.
> what else should i consider while taking the input 

I dont want to restrict users from inputing symbols which are harmless. so is there any particular set of character which i need to filter before storing the values into the database, so i can properly write regex checks for my form fields?

I have searched in google but was not able to find a proper answer. :(
Safty precaustions while doing html form processiong using javascript, PHP, MySQL
===

I am not a professional web developer but i love web development as a hobby..
I am a student and i was asked to make an departmental event web site. I need to create a HTML forms for user registration. I am aware of XXS Scripting attack and SQL Injection. But dont know how they exactly work. I am using PHP and MySQL on server side.

I am taking in consideration:
> Not to take empty values.
> Verify that a number field is composed of integer values only.
> Email ID verification. etc..

All this I am doing using RegEx check both on javascript and PHP

Now my question is:
> what are all characters which i should not allow into my database.
> will it be okay if i convert < and > with there & lt; and & gt; alternatives.
> what else should i consider while taking the input 

I dont want to restrict users from inputing symbols which are harmless. so is there any particular set of character which i need to filter before storing the values into the database, so i can properly write regex checks for my form fields?

I have searched in google but was not able to find a proper answer. :(