Sir could you please tell me what are the things to consider when developing a dynamic or e-commerce type of website. I just want to understand more about websites. the risk and how do I prevent them. I know bit in sql injection,hackers and spammers but not that much.. please discuss

Well the first thing that comes up when developing a website is the languages that u will use. So be clear on that. PHP for server-side, javascript/jQuery for client-side, HTML and CSS are enough.
If you really want to launch the website online then you may also want to know about Search Engine Optimization(SEO), so that your site can easily be found by others via a search engine. Refer this for more on SEO.

When launching a website online you also have to book a domain name with a Registrar like http://godaddy.com and buy a hosting service or maybe a free one in the beginning. Examine the Hosting Plans carefully if you go for a paid one.

As it comes to security always try to use best practices for standard things. For Example: You must use prepared statements and mysqli to access the database to prevent sql injection.
Other than SQL injection, XSS is also common. Validate form data well, may be at both ends(server and client).
For spammers there is always CAPTCHA, but your site policies,etc also govern spamming.
For more on SQL injection and how to prevent it: Refer this.
That's all that I could get off the top of my head. If you want more on anything specific just tell me to.

very nice sIr it helps alot. I also want to know if the spyware or adware affect websites?

According to WeboPedia:

phrase adware is to describe a form of spyware that collects information about the user in order to display advertisements in the Web browser. Unfortunately, some applications that contain adware track your Internet surfing habits in order to serve ads related to you. When the adware becomes intrusive like this, then we move it into the spyware category and it then becomes something you should avoid for privacy and security reasons.

So you may install an adware on your website but be careful that it is not too intrusive else it will be categorized as Spyware. Ads are also annoying for a user, so i'll put only a very few of them on mine.

A hacker may hack your website and install one on it so you have to be careful about that as well.

I am bit scared with the hackers but then I know this is just for now.. yeah thank you so much sir, your such a good man.. til nxtym

Please mark the question solved if it is.

To build a ecommerce website we also need;
-payment process
-Mobile compatibility
-SSL certificate

I am in the requirements identification phase in the endeavor of developing my own interactive services website from scratch and would like to thank you tapananand for confirming the initial skills needed that I've identified as being pertinent as well as you ewail1 for identifying skills the need of which I had not identified.

Best Regards,
aeinstein

Don't forget to optimze your site for conversions. This means you should make the checkout progress easy and efficient for the user. Your site should work fast and not require unnecessary steps. Payment is another big topic. You can't expect all of your users to have a paypal account. Depending on the country in which you plan to opperate there are probably specific payment gateways you will need to implement. Most countries use local debit cards / online banking and not just CC.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.