Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'connect.php';
- if (isset($_POST))
- {
- $FullName = $_POST['FullName'];
- $UserName = $_POST['UserName'];
- $B - D = $_POST['B-D'];
- $Gender = $_POST['Gender'];
- $Address = $_POST['Address'];
- $Phone = $_POST['Phone'];
- $Email = $_POST['Email'];
- $City = $_POST['City'];
- $Country = $_POST['Country'];
- $PassWord = $_POST['PassWord'];
- $repons = $bdd->query('select count(*) from user where Username ='' . $UserName . ''')->fetchColumn();
- if ($repons == 1)
- {
- echo 'user already exist';
- }
- else
- {
- $req = $bdd->prepare('INSERT INTO user VALUES ("",:UserName,:PassWord,:B-D,:Email,:FullName,:Phone,:Gender,:Address,:City,:Country)');
- $req->execute(array(
- ':FullName' => $FullName,
- ':UserName' => $UserName,
- ':B-D' => $BirthDate,
- ':Gender' => $Gender,
- ':Phone' => $Phone,
- ':Email' => $Email,
- ':City' => $City,
- ':Country' => $Country,
- ':PassWord' => $PassWord,
- ':Address' => $Address
- ));
- $idp = $bdd->lastInsertId();
- echo 'you are now a member confirmation email sent';
- }
- else
- {
- echo 'submit is not set';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement