Note that there are some explanatory texts on larger screens.

plurals
  1. POxcode for NSURL connection with PHP and database (online)
    primarykey
    data
    text
    <p>i am creating a register and login form in XCode.. have four textfields 1. nameText 2. MessageText 3. emailidText 4. passwordText</p> <p>it was running good when i have first 2 fields and when i added emailid and password TExts, mysql database table is updated like all textfields in one cell.for Example</p> <ol> <li>nameText - selva</li> <li>MessageText - hello</li> <li>emailidText - abc@abc.com</li> <li>passwordText - xxxxxx</li> </ol> <p>it update like selva?message=hello?emailid=abc@abc.com?password=xxxxxx on the name cell and rest of the 3 cells in table are empty...</p> <p>i checked my PHP by creating HTML file and linked to it, it is working very fine. NOTE: i am working on online HOSt and online MYSQL database....</p> <p>this is what i am declared in my viewcontroller.m </p> <pre><code>-(void)postMessage:(NSString*) message withName:(NSString *) name withName: (NSString*)emailid withName:(NSString *)password { if (name !=nil &amp;&amp; message != nil &amp;&amp; emailid !=nil &amp;&amp; password !=nil) { NSMutableString *postString = [NSMutableString stringWithString:kpostURL]; [postString appendString:[NSString stringWithFormat:@"?%@=%@", kName, name]]; [postString appendString:[NSString stringWithFormat:@"?%@=%@", kMessage, message]]; [postString appendString:[NSString stringWithFormat:@"?%@=%@", kemailid, emailid]]; [postString appendString:[NSString stringWithFormat:@"?%@=%@", kpassword, password]]; [postString setString:[postString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSMutableURLRequest *request=[[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:postString]]; [request setHTTPMethod:@"POST"]; postConnection =[[ NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES]; } } -(IBAction)post:(id)sender { [self postMessage:messageText.text withName:nameText.text withName:emailidText.text withName:passwordtext.text]; passwordtext.text= nil; messageText.text= nil; nameText.text = nil; emailidText.text=nil; } </code></pre> <p>created macros in viewcontroller.h and declared the four fields too..</p> <p>i dont know why i am getting my o/p of all the four fields in one cell??</p> <p>can anyone help me to clear my error please..</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload