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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.