anonymous No title
No License PHP
2021年06月14日
Copy Clone
<?php
session_start();
$dsn = "mysql:dbname=co_19_349_99sv_coco_com;host=localhost;charset=UTF8";
$name_db = "co-19-349.99sv-c";
$password_db = "U2j9s5dQ";

try {
  $mysql = new PDO($dsn,$name_db,$password_db);

} catch (PDOExcption $e){
  echo "エラー" . $e->getMessage() ;
}


if (!empty($_POST["roguinn_submit"])) {

  if (!empty($_POST["roguinn_id"])&&!empty($_POST["roguinn_password"])) {

    if (preg_match("/^[a-zA-Z0-9]+$/",$_POST["roguinn_id"])&&preg_match("/^[a-zA-Z0-9]+$/",$_POST["roguinn_password"])) {

      $roguinn_id = $_POST["roguinn_id"];
      $roguinn_password = $_POST["roguinn_password"];

      $select_sql = "SELECT * FROM kadai_3_1 WHERE id='" . $roguinn_id . "' AND password='" . $roguinn_password . "'";
      $select_sql_query = $mysql->query($select_sql);
      while ($select_sql_query_fetch = $select_sql_query->fetch(PDO::FETCH_ASSOC)) {
              $_SESSION["id"] = $select_sql_query_fetch["id"];
              $_SESSION["password"] = $select_sql_query_fetch["password"];
              $_SESSION["name"] = $select_sql_query_fetch["name"];
              setcookie(name,$_SESSION["name"],1623632328);
        }

      if (!empty($_SESSION["id"])&&!empty($_SESSION["password"])) {

        header('Location: ./kadai_2_ouyou.php');
      }else{
        echo "ID、パスワードが正しくありません";
      }

    }else{
      echo "IDとパスワードは半角英数字で入力してください";
    }
  }else{
    echo "IDとパスワードを両方入力してください";
  }
}

 ?>


<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <title>ログインページ</title>
  </head>
  <body>
    <h1>ログインページ</h1>
    <p>*IDとパスワードを半角で入力してください</p>
    <br />
    <form action="kadai_2_ouyou.php" method="post">
      ID:<input type="text" name="roguinn_id" value="<?php if(!empty($_SESSION["id"])){echo $_SESSION["id"];} ?>"><br>
      <br />
      パスワード:<input type="text" name="roguinn_password" value="<?php  if(!empty($_SESSION["password"])){echo $_SESSION["password"];} ?>"><br>
      <br />
      <input type="submit" name="roguinn_submit" value="ログイン">
    </form>
  </body>
</html>
<?php
session_start();
$dsn = "mysql:dbname=co_19_349_99sv_coco_com;host=localhost;charset=UTF8";
$name_db = "co-19-349.99sv-c";
$password_db = "U2j9s5dQ";

try {
  $mysql = new PDO($dsn,$name_db,$password_db);

} catch (PDOExcption $e){
  echo "エラー" . $e->getMessage() ;
}


if (!empty($_POST["roguinn_submit"])) {

  if (!empty($_POST["roguinn_id"])&&!empty($_POST["roguinn_password"])) {

    if (preg_match("/^[a-zA-Z0-9]+$/",$_POST["roguinn_id"])&&preg_match("/^[a-zA-Z0-9]+$/",$_POST["roguinn_password"])) {

      $roguinn_id = $_POST["roguinn_id"];
      $roguinn_password = $_POST["roguinn_password"];

      $select_sql = "SELECT * FROM kadai_3_1 WHERE id='" . $roguinn_id . "' AND password='" . $roguinn_password . "'";
      $select_sql_query = $mysql->query($select_sql);
      while ($select_sql_query_fetch = $select_sql_query->fetch(PDO::FETCH_ASSOC)) {
              $_SESSION["id"] = $select_sql_query_fetch["id"];
              $_SESSION["password"] = $select_sql_query_fetch["password"];
              $_SESSION["name"] = $select_sql_query_fetch["name"];
              setcookie(name,$_SESSION["name"],1623632328);
        }

      if (!empty($_SESSION["id"])&&!empty($_SESSION["password"])) {

        header('Location: ./kadai_2_ouyou.php');
      }else{
        echo "ID、パスワードが正しくありません";
      }

    }else{
      echo "IDとパスワードは半角英数字で入力してください";
    }
  }else{
    echo "IDとパスワードを両方入力してください";
  }
}

 ?>


<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <title>ログインページ</title>
  </head>
  <body>
    <h1>ログインページ</h1>
    <p>*IDとパスワードを半角で入力してください</p>
    <br />
    <form action="kadai_2_ouyou.php" method="post">
      ID:<input type="text" name="roguinn_id" value="<?php if(!empty($_SESSION["id"])){echo $_SESSION["id"];} ?>"><br>
      <br />
      パスワード:<input type="text" name="roguinn_password" value="<?php  if(!empty($_SESSION["password"])){echo $_SESSION["password"];} ?>"><br>
      <br />
      <input type="submit" name="roguinn_submit" value="ログイン">
    </form>
  </body>
</html>
anonymous
Anonymous
2021年06月15日
Hello from order-fulfillment.net, Doing your own product shipping or order fulfillment in house? Tired of it? Visit us on www.order-fulfillment.net We can store, inventory, and manage your drop shipping / order fulfillment for you. Based in the US for almost 2 decades - we ship around the world and will save you time and money. Who would be the best contact at your company to discuss? Here are some of the items we ship for clients: -Books, training manuals, guides -New member welcomes boxes and gifts -Product samples -Marketing materials -Medical program test kits -Follow up gifts to clients, leads, and prospects Thank you! Fulfillment Warehouse https://order-fulfillment.net
anonymous
Anonymous
2021年06月18日
Hello from FbCourses.net Want to pay $0.01 a click? We got you covered. A great team of Global Digital Marketing experts have compiled this list of 13 Best + Free Facebook Advertising Training, Classes and Courses to help you learn and excel at Facebook Ads & Marketing. Thousands of professionals have already benefited from this list on Facebook Training. Regards, Rochelle
Output