1

I have to call below function call to my php file...if any one have idea please help....

  function update_hidden_input(saved_tokens, hidden_input) 
{
    var token_values = $.map(saved_tokens, function (el) 
{
            //alert(el[settings.tokenValue]);
            return el[settings.tokenValue];
 });

    hidden_input.val(token_values.join(settings.tokenDelimiter));
         //var frienduid =(token_values.join(settings.tokenDelimiter));
        //alert(frienduid);
    }
Prashant
  • 79
  • 11
  • 1
    Please search before asking, this has been asked and answered many times. See http://stackoverflow.com/questions/14688946/sending-data-with-ajax-to-a-php-file-and-using-that-data-to-run-a-php-script – Christoph Grimmer Mar 02 '13 at 10:32
  • @ChristophGrimmer-Dietrich i don't know how it call because it gives me call to undefined function error..... – Prashant Mar 02 '13 at 11:59
  • @ChristophGrimmer-Dietrich i include the script where this function was reside.. – Prashant Mar 02 '13 at 12:00

1 Answers1

0

You can done with it by using jQuery.ajax() or jQuery.post() function to send data to the PHP. but it is not secured. Because JavaScript is open for all browser. Bad guys can send unexpected data and take chances to harm your app / web. Anyway it is your choice.

Check facebook server-side-login, it can help you more.

itskawsar
  • 1,232
  • 1
  • 19
  • 30