Jump to content

how to send JS variables to mysql


unistake

Recommended Posts

Okay lemme see if I got this right, you want to pass your javascript values to php? Im kinda new to php so Ill tell you what I know. An easier way would be to use get method. For eg, if you want to pass the value of var variable='somethin' to php try. document.location='website.com/code.php?var='+variable; Or use an iframe or popup window to pass the value along.And set your php code to$_GET the variable. $varible=$_GET['var'];and use it to pass the value to mysql.

Theres a more complex way to do this too, if you wanna use POST method.Using ajax. Lemme know if you wanna know that. Ill give you the code.

I can tell you more if you tell me more about your code. What do you want  to do with this variable? :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.