Click here to Skip to main content
15,903,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,

I want to insert record into my mysql db using javascript. for example if i give www.google.com in url i want to store google and www.google.com into mysqldb. Please help javascript to split word and also insert into db.

Thanks
Posted
Comments
Arunprasath Natarajan 4-Oct-12 10:53am    
You can try with Ajax.

1 solution

Javascript has no connection to MySql, nor should there ever be. To do so would allow any site access to your local MySql instance, since javascript is run on the Client, not the Server. This would be a bad idea, as it would provide an execution path available to any website. Not good!

Access the database in the codebehind on the server, you can't do it on the client.
 
Share this answer
 
Comments
Arunprasath Natarajan 4-Oct-12 10:53am    
Well Said..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900