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

  • SEARCH
  • Home
  • 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 8318687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:03:51+00:00 2026-06-08T22:03:51+00:00

I am getting data from severs in json format but i want that user

  • 0

I am getting data from severs in json format but i want that user should send user_id while calling the json service so that it should show the desired result i am using following code

how to call the data from iphone by post passing the user_id
PHP CODE

I have used

   $user_id=$_POST['user_id'];
   $query = mysql_query("SELECT s.*, u.user_id FROM survey_master AS s
JOIN user_profile AS u on u.user_id = s.user_id where s.user_id=$user_id");

    $rows = array();
    while($row = mysql_fetch_assoc($query)) {
   $rows[] = $row;
   }
  echo json_encode($rows);

iPhone Code

  NSArray *tempArray =[[DataManager staticVersion] startParsing:@"http://celeritas-solutions.com/emrapp/surveyDescription.php"];

for (int i = 0; i<[tempArray count]; i++) {

    id *item = [tempArray objectAtIndex:i];
    NSDictionary *dict = (NSDictionary *) item;
    ObjectData *theObject =[[ObjectData alloc] init];
    [theObject setSurvey_title:[dict objectForKey:@"survey_Title"]];
    [theObject setSurvey_Description:[dict objectForKey:@"survey_Description"]];    
    [theObject setDate_Created:[dict objectForKey:@"date_Created"]];

    [surveyList addObject:theObject];
    [theObject release];
    theObject=nil;
}
  • 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-06-08T22:03:52+00:00Added an answer on June 8, 2026 at 10:03 pm

    You can use GET for sending user_id.

    At PHP;

    $user_id=$_GET['user_id'];
    

    AT IPhone;

      NSString *url = [NSString stringWithFormat:@"http://celeritas-solutions.com/emrapp/surveyDescription.php?user_id=%@", user_id];
      NSArray *tempArray =[[DataManager staticVersion] startParsing:url];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

how can i getting data from listbox in second form named listform while i
I am getting data from iphone using php but when i insert post data
i am getting following error while getting data from dictionary -[__NSCFString objectForKey:]: unrecognized selector
I need to automate a process that involves getting data from a series of
I have a custom list view that is getting data from server and changing
Have problem while getting data from Memcached on .NET MVC solution. I have this
Im getting data from a server by executing this code: - (void) sendGeneral:(NSString *)
I am getting data from server it gives in response a NSString which hase
I have the following two methods for getting data from my database: - (void)
What are the differences between using SqlDataAdapter vs SqlDataReader for getting data from a

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.