anonymous No title
No License PHP
2021年06月08日
Copy Clone
<h1><?php echo "登録完了";?></h1>

<?php
$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() ;
}
$select_sql = "SELECT * FROM kadai_3_1 WHERE id=(select max(id) from kadai_3_1)";
$select_sql_query = $mysql->query($select_sql);
while ($select_sql_query_fetch = $select_sql_query->fetch(PDO::FETCH_ASSOC)) {
  echo "あなたのユーザー情報は" . "<br>" . "ID:{$select_sql_query_fetch["id"]}" . "<br>" . "名前:{$select_sql_query_fetch["name"]}" . "<br>" . "パスワード:{$select_sql_query_fetch["password"]}";
}
 ?>
<h1><?php echo "登録完了";?></h1>

<?php
$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() ;
}
$select_sql = "SELECT * FROM kadai_3_1 WHERE id=(select max(id) from kadai_3_1)";
$select_sql_query = $mysql->query($select_sql);
while ($select_sql_query_fetch = $select_sql_query->fetch(PDO::FETCH_ASSOC)) {
  echo "あなたのユーザー情報は" . "<br>" . "ID:{$select_sql_query_fetch["id"]}" . "<br>" . "名前:{$select_sql_query_fetch["name"]}" . "<br>" . "パスワード:{$select_sql_query_fetch["password"]}";
}
 ?>
No one still commented. Please first comment.
Output