Jump to content

Some Help About Javascript


[dx]
 Share

Recommended Posts

Hi,I'm trying figure out how javascript works..Will something like this work?

function bla() {  some1 = getElementById("something1");  some2 = getElementById("something2");  http.open('get', '/query.php?some1='+some1+'&some2='+some2);}

or how it's going on... No matter, in any case, if it work, lets say.. is it good way to do it.. if someone type url in browser like www.address.com/query.php?some1=some1&some2=some2 , that means he can access db and input whatever he wants on every location...What is the best way to make function to insert some infos to db, or do mysql update etc..Thanks

Link to comment
Share on other sites

You use php or some other server side language for all of that stuff. Anything you can do with php, you should, because people can have JavaScript turned off, but php will go about its business completely unhindered by any settings your visitors have.

Link to comment
Share on other sites

Well, I can't do whole web by forms submiting post to other page, then using $_GETFor example: I have link with image <a><img></a> and I need to make it increase by 1 every time I click on link/imageWhat is the best and simplies way?

Edited by Haris S
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...