ViewController.h
//
// ViewController.h
// InsertMysql_Registration
//
// Created by apple on 19/02/13.
// Copyright (c) 2013 apple. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (strong, nonatomic) IBOutlet UITextField *t1;
@property (strong, nonatomic) IBOutlet UITextField *t2;
@property (strong, nonatomic) IBOutlet UITextField *t3;
- (IBAction)Register:(id)sender;
- (IBAction)delete:(id)sender;
@end
//
// ViewController.m
// InsertMysql_Registration
//
// Created by apple on 19/02/13.
// Copyright (c) 2013 apple. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize t1;
@synthesize t2;
@synthesize t3;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)Register:(id)sender {
NSString *url=[NSString stringWithFormat:@"http://localhost/App1/Registration.php?name=%@&age=%@&sex=%@",t1.text,t2.text,t3.text];
//To exicute php code
NSData *dataUrl=[NSData dataWithContentsOfURL:[NSURL URLWithString:url]];
}
- (IBAction)delete:(id)sender {
NSString *url1=[NSString stringWithFormat:@"http://localhost/App1/Delete.php"];
//To exicute php code
NSData *dataUrl1=[NSData dataWithContentsOfURL:[NSURL URLWithString:url1]];
}
@end
No comments:
Post a Comment