Updated DB, friend.php, edit.php etc.

Edit.php --> submit --> save question, options in tables Question,
Options in file input.php and redirect to friend.php
Friend.php --> submit --> store UID's in json and post to
friend_input.php and store UID's, QID in results table