I have a javascript function. It has a variable that takes a particular value (entered by user). I need to insert this value in an sql database. I know I cannot use javascript to connect to database, I need to use php for that. Can you tell me how to do that? Just explain, I will write the code. I mean, do i need to create a new php file (but then if i create a new php sheet,then how can i access this variable bcz its in an all together different php sheet) or can I write in the same file, stuff like this....
Asked
Active
Viewed 157 times
1 Answers
1
Sounds to me like you need an AJAX call to a separate PHP file to process the script and return the values to the JavaScript.

PseudoNinja
- 2,846
- 1
- 27
- 37