Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4017374
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:51:12+00:00 2026-05-20T09:51:12+00:00

I am building a Facebook survey, in which there are multiple questions per a

  • 0

I am building a Facebook survey, in which there are multiple questions per a random selected friend.

my methodology for doing so is to show a php page with one friend and his/her questions

and when the user submits, it should post to the same php page but with an array containing the left to be shown friends ids.

this is I have such architecture and relevant code:

home.php – logging into facebook

framing.php – managing the survey

$idArray = friends id array...
$pageToReturnTo = $_SERVER['PHP_SELF'];
$q_html = questionnaire($idArray,$pageToReturnTo);

q.php – containing a functions that gets the current survey from db and manipulate it to html

function questionnaire($idArray,$pageToReturnTo){
...
$idArray_imploded = implode(",",$idArray)
$html .= "<form method='POST' action='".$pageToReturnTo."}?idArray=".$idArray_imploded."'>
....
return $html;
}

the problem is that the facebook returns an error like this:

Received HTTP error code 404 while loading http://www.mydomain.com/%7D?idArray=757010120%...
  1. though I am asking about the php_self in framing.php, I don’t see it in the generated url, can someone please explain why?
  2. how can I resolve this? if not can you please suggest an alternative?

thanks a million!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:51:12+00:00Added an answer on May 20, 2026 at 9:51 am

    Looks like you have an extra } in your $html right before ?idArray=. That’s the %7D you see in the returned error from Facebook.

    $html .= "<form method='POST' action='".$pageToReturnTo."?idArray=".$idArray_imploded."'>
    

    Also, you should check to ensure that $_SERVER['PHP_SELF'] actually contains a value. It looks like it may be empty on your server. There are a few other ways to get the name of the currently running script. For testing you could just replace $_SERVER['PHP_SELF'] with the hardcoded name of the php script, just to make sure that your script is actually working.

    // $pageToReturnTo = $_SERVER['PHP_SELF'];
    $pageToReturnTo = 'myscript.php';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a Facebook application which should not be viewable to anyone under
I am building a website for a comedy group which uses Facebook as one
i am building a facebook app which is somehow generating these weird errors. the
Introduction: I am building a facebook app which auto wishes happy birthday. I am
I'm building a Facebook App which grabs the URLs from various sources in a
I am building an facebook app which runs in a tab of a site
How to start building pages with Facebook FBML . There is a good sources
I am building an iPhone app which uses Facebook iOS SDK and Three20. I
I am building a Facebook App which is heavy on Javascript. For this I
I'm using the PHP Facebook SDK (v.3.1.1) for building my Facebook app. At some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.