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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T16:05:03+00:00 2026-05-29T16:05:03+00:00

Encountered a problem on posting comment back to a comment box. post not showing

  • 0

Encountered a problem on posting comment back to a comment box.
post not showing up, there is no error or whatsoever to check.

EDIT: Correct Answer

-(void)postToBoard
{      
  NSString *post = @"author=Jos&email=mail@domain.com.au&url=&comment=score+99.&submit=Post+Comment&comment_post_ID=1&comment_post_ID=1&comment_parent=0";

    NSData *postData = [post dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];

    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
    NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]];

    NSString *URLString = @"http://site.com.au/?p=1";
    NSURL *postURL = [NSURL URLWithString:URLString];    

    [request setURL:postURL];
    [request setHTTPMethod:@"POST"];
[request setValue:postLength forHTTPHeaderField:@"Content-Length"];
[request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
//[request setValue:@"wp-comments-post.php" forHTTPHeaderField:@"HTTP/1.1"];
[request setHTTPBody:postData];

    //self.receivedData = [NSMutableData data];
    self.postConnection = [NSURLConnection connectionWithRequest:request delegate:self];
    }
  • 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-29T16:05:04+00:00Added an answer on May 29, 2026 at 4:05 pm

    This line looks wrong:

    [request setValue:@"wp-comments-post.php" forHTTPHeaderField:@"Content-Type"];
    

    It should be:

    [request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
    

    I’m not sure what you’re supposed to do with “wp-comments-post.php”, should that perhaps be in the URL instead?

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

Sidebar

Related Questions

I have encountered a problem that I have not come accross yet when setting
I encountered an interesting problem today which I thought was not possible in Java.
I encountered a problem in c++. I read some codes,but there was a very
Problem Encountered At runtime, I always get the following NHibernate.MappingException : Could not compile
We encountered a problem with using Subversion on Windows. A developer committed a file
I encountered a problem when running some old code that was handed down to
I encountered a problem dealing with UTF-8, XML and Perl. The following is the
I recently encountered a problem where a value was null if accessed with Request.Form
I've encountered a problem when retrieving a JSONP response from a server in a
I've encountered a problem with my Netbeans 6.1 IDE. After an unsuccessful update, Netbeans

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.