1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| public function create(User $user)
{
$req = $this->bd->prepare('INSERT INTO users (email, firstName, lastName, adress, diet, country, allergy, clothingSize, tel)
VALUES (:email, :firstName, :lastName, :adress, :diet, :country, :allergy, :clothingSize, :telNumber)');
$req->bindParam(':email', $email);
$req->bindParam(':firstName', $firstName);
$req->bindParam(':lastName', $lastName);
$req->bindParam(':adress', $adress);
$req->bindParam(':diet', $diet);
$req->bindParam(':country', $country);
$req->bindParam(':allergy', $allergy);
$req->bindParam(':clothingSize', $clothingSize);
$req->bindParam(':telNumber', $telNumber);
$email = $user->getEmail();
echo "Email : ".$email;
$firstName = $user->getFirstName();
$lastName = $user->getLastName();
$adress = $user->getAdress();
$diet = $user->getDiet();
$country = $user->getCountry();
$allergy = $user->getAllergy();
$clothingSize = $user->getClothingSize();
$telNumber = $user->getTelNumber();
$req->execute();
echo "Apres execution ";
} |
Partager