Jump to content

Inserting An Array Into My Database


almightyegg

Recommended Posts

Hi guys!

I have a logon script that I'm working on to try and get Facebook sign up/log in working.

When registering it is now getting all the values I need which is great but it's chucking them into an awkward set of arrays...

Array
(
   [algorithm] => HMAC-SHA256
   [expires] => 1356426000
   [issued_at] => 1356420441
   [oauth_token] => AAAHTZCHpjGLMBAIBAtq5BOeMO4QSpmOQqq2UuinbqUgsZB4FeBICfXqUPXrVrvYVcPcnqyH9Lg9lQskzOhbZCKOUFOFxN61Fue0NSbeCzztygWTFLwR
   [registration] => Array
       (
           [name] => William Masters
           [birthday] => 01/19/xxxx
           [location] => Array
               (
                   [name] => Bristol, United Kingdom
                   [id] => 108700782494847
               )


           [gender] => male
           [email] => [email protected]
           [username] => [email protected]
           [password] => blahlbahalbah
       )


   [registration_metadata] => Array
       (
           [fields] => [{"name":"name"},
                                       {"name":"birthday"},
                                       {"name":"location"},
                                       {"name":"gender"},
                                       {"name":"email"},
                                       {"name":"username","description":"Username","type":"text"},
                                       {"name":"password"}]
       )


   [user] => Array
       (
           [country] => gb
           [locale] => en_GB
       )


   [user_id] => 1617300026
)

 

So I now need to grab all these values and insert them in my database, how would I go about doing this??

I am very rusty with my PHP - used to be pretty sharp but haven't done it in a few years now

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/272345-inserting-an-array-into-my-database/
Share on other sites

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.