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 979827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:16:46+00:00 2026-05-16T04:16:46+00:00

I hav to save the values of NSUserDefault to the Array,and later on have

  • 0

I hav to save the values of NSUserDefault to the Array,and later on have to POST the values
bu usind HTTP POST, m trying this code,its working perfactly (when i reopen my application values reappear on the screen)but when i input tte values….it displays userneme=null,database=null…..)what should i have to do.should i have to save NSUserDefault’s value to array and then POST,,,,plz help me out…..code would be appreaciated…Thanx in Advance

[NSUserDefaults resetStandardUserDefaults];

NSUserDefaults *storeData = [NSUserDefaults standardUserDefaults];
[storeData setObject:utextFieldNormal.text forKey:@"username"];
[storeData setObject:urltextFieldNormal.text forKey:@"url"];
[storeData setObject:dtextFieldNormal.text forKey:@"database"];



[storeData setObject:utextFieldNormal.text forKey:@"username"];
[storeData setObject:urltextFieldNormal.text forKey:@"url"];
[storeData setObject:dtextFieldNormal.text forKey:@"database"];

NSString *val1= [storeData valueForKey:@"username "];
NSString *val2= [storeData valueForKey:@"url"];
NSString *val3= [storeData valueForKey:@"database "];



//NSLog(@"username:%@",username);
NSLog(@"username:%@",val1);
NSLog(@"url:%@",val2);
NSLog(@"database:%@",val3);

[storeData synchronize];
  • 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-16T04:16:46+00:00Added an answer on May 16, 2026 at 4:16 am

    Is this the actual code copy/pasted? The key strings passed to valueForkey have extra spaces at the end. Remove the spaces and it’ll work fine.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi i hav a code like this in the end i m getting error
im a newbie to flash,and i hav got this really weird problem.i have created
I have a XML file that looks like this <Licence> <Name>Test company</Name> <Version>1.1.1.1</Version> <NumberOfServer>2</NumberOfServer>
I hav a string e.g. 2010-09-24 . Now I want this string read as
I hav codes eg1.py , eg2.py , eg3.py eg3.py imports eg2.py which in turn
i hav created a COM component using vs2005 . Now let me know can
In my applications i hav a terms and conditions view describing terms to use
0 in my case i hav to navigate frm 1 screen to nthr aftr
If using subsonic, i know you hav to close a datareader. but what if
i hav removed items from tool bar,but i want to re add it at

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.