javascript call php in backend -


i have facebook login button in index.php page.

<fb:login-button onlogin="onlogin()"></fb:login-button> 

when user click on button, calls function onlogin() in javascript.

<script type="text/javascript">     function onlogin() {         if(fb.getsession()!=null){             //pass value save.php         }     } </script> 

what should let onlogin() call save.php page store data in database?

you need use form of ajax make call server javascript. see jquery ajax libraries. however, want make sure call secured, i.e., cannot made manually malicious users want add data database.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -