私は苦しめられてきました。なぜこのコードが機能しないのか理解できませんか? 私は何を間違えましたか?ありがとう、私は本当に助けが必要です
<?php
$name = $POST['name'];
$tel = $POST['tel'];
$dbhost = "sql200.60ru.com";
$dbuser = "****";
$dbpassword = "***";
$dbname = "60ru_11939825_zav333";
$link = mysql_connect($dbhost, $dbuser, $dbpassword);
mysql_select_db($dbname, $link);
$query = "INSERT INTO customer (name, tel) VALUES (" . $name . "," . $tel . ")";
mysql_query($query, $link);
mysql_close($link);
?>
と
NSString *bodyData = @"fio=GGG&telefon=2521521551277777";
NSMutableURLRequest *postRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://zav333.60ru.com/test/insert.php"]];
[postRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
[postRequest setHTTPMethod:@"POST"];
[postRequest setHTTPBody:[NSData dataWithBytes:[bodyData UTF8String] length:[bodyData length]]];
self.mainUrl = [[NSURLConnection alloc] initWithRequest:postRequest delegate:self];