{"id":525,"date":"2024-04-29T05:45:23","date_gmt":"2024-04-29T05:45:23","guid":{"rendered":"https:\/\/www.freelifemakers.org\/wordpress\/?p=525"},"modified":"2024-05-07T22:34:04","modified_gmt":"2024-05-07T22:34:04","slug":"php-database-input","status":"publish","type":"post","link":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/2024\/04\/29\/php-database-input\/","title":{"rendered":"PHP MYSQL\ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc785\ub825Database input"},"content":{"rendered":"\n<p>\uc544\ub798\ub294 form6.php\uc640 form_action6.php\ud30c\uc77c\uc758 \ub0b4\uc6a9\uc785\ub2c8\ub2e4.<br>\uc774\uc804\uc5d0 \ub2e4\ub918\ub358 \ub0b4\uc6a9\uacfc \ub9ce\uc740 \ubd80\ubd84 \uc77c\uce58\ud569\ub2c8\ub2e4.<br>\ub370\uc774\ud130 \ubca0\uc774\uc2a4 \uc785\ub825 \ubd80\ubd84\ub9cc \uc0b4\ud3b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<br>\ub370\uc774\ud130\ubca0\uc774\uc2a4\ub294 MYSQL\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<p>Below are the contents of the form6.php and form_action6.php files.<br>This is largely consistent with what we covered previously.<br>Let&#8217;s only look at the database input part.<br>The database we will use is mysql.<\/p>\n\n\n\n<p>1.MYSQL \ub85c\uadf8\uc778 LOGIN<br>new mysqli(&#8220;server host&#8221;,&#8221;username&#8221;,&#8221;password&#8221;,&#8221;databasename&#8221;); \uc774 \ubd80\ubd84\uc774 MYSQL\ub370\uc774\ud130 \ubca0\uc774\uc2a4\uc5d0 \ub85c\uadf8\uc778 \ud558\ub294 \ubd80\ubd84\uc785\ub2c8\ub2e4.<br>new mysqli(&#8220;server host&#8221;,&#8221;user name&#8221;,&#8221;password&#8221;,&#8221;database name&#8221;); This is where you log in to the MYSQL database.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/mysql auth\n$servername = \"localhost\";\n$username = \" \";\n$password = \" \";\n$dbname = \" \";\n\n\/\/connect mysql\n$mysqli = new mysqli($servername,$username,$password,$dbname);<\/code><\/pre>\n\n\n\n<p>2.MYSQL ERROR CHECK<br>MYSQL\ub85c\uadf8\uc778\uc2dc \ub85c\uadf8\uc778\uc774 \uc2e4\ud328\ud558\uba74 \uc624\ub958 \uba54\uc138\uc9c0\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.<br>When logging into MYSQL, if login fails, an error message is displayed.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   \/\/mysql error check\n   if ($mysqli-&gt;connect_errno) {\n       printf(\"Connect failed: %s\\n\", $mysqli-&gt;connect_error);\n       exit();\n   }<\/code><\/pre>\n\n\n\n<p>3.MYSQL \uc790\ub8cc \uc785\ub825 Data input<br>\uc815\uc0c1\uc801\uc73c\ub85c \uc790\ub8cc\uc785\ub825\uc774 \ub418\uba74  &#8220;New record created successfully&#8221; \uba54\uc2dc\uc9c0\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.<br>\uc785\ub825\uc2e4\ud328\uc2dc \uc624\ub958 \uba54\uc2dc\uc9c0\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.<br>If data is entered normally, the message \u201cNew record created successfully\u201d is displayed.<br>If input fails, an error message is output.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n    $sql = \"INSERT INTO testuser (name,email,title,website,pwd,comment) values('$f_name','$f_email','$f_title','$f_website','$f_pwd','$f_comment')\";\n    if($mysqli-&gt;query($sql)){\n        echo \"New record created successfully\";\n    }else{\n        printf(\"Connect failed: %s\\n\", $mysqli-&gt;connect_error);\n        exit();\n    };<\/code><\/pre>\n\n\n\n<p>4.COMMENT\ucc98\ub9ac \ubd80\ubd84[CREATE TABLE] ( COMMENT PART[CREATE TABLE])<br>\ud14c\uc774\ube14\uc774 \uc874\uc7ac\ud558\uc9c0 \uc54a\uc744 \uacbd\uc6b0 \uc0dd\uc131\ud558\ub294 \ubd80\ubd84\uc785\ub2c8\ub2e4. <br>\ud544\uc694\uc2dc COMMENT\uc0ad\uc81c\ud558\uace0 \uc0ac\uc6a9\ud560 \uc218  \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n\n\n\n<p>This is the part that creates the table if it does not exist.<br>If necessary, you can delete COMMENT and use it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>   \/*\n       ** create table **\n       $sql = \"CREATE TABLE IF NOT EXISTS testuser (\n           id int(6) unsigned auto_increment primary key,\n           name varchar(30) not null,\n           email varchar(30) not null,\n           title varchar(30) not null,\n           website varchar(30) not null,\n           pwd varchar(20) not null,\n           comment text ); \";\n\n        $mysqli-&gt;query($sql);\n    *\/<\/code><\/pre>\n\n\n\n<p>5.COMMENT\ucc98\ub9ac \ubd80\ubd84-\ud398\uc774\uc9c0 \uc774\ub3d9(COMMENT part &#8211; page movement)<br>\ub370\uc774\ud130\ubca0\uc774\uc2a4\uc790\ub8cc \uc785\ub825\uc774 \uc644\ub8cc\ub418\uba74 \ud398\uc774\uc9c0 \uc774\ub3d9\ud569\ub2c8\ub2e4.<br>Once database data entry is complete, the page moves.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>  \/\/ echo (\"&lt;script&gt; window.location.href = '.\/list.php'; &lt;\/script&gt; \");<\/code><\/pre>\n\n\n\n<p>6.\uc804\uccb4\ucf54\ub4dc(FULL CODE)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>form6.php\n&lt;?php\n\n$fileName = \".\/form_action6.php\";\n\nif(!is_file($fileName)){\n    $form_action_name = basename($_SERVER&#91;'PHP_SELF']);\n}else{\n    $form_action_name = \".\/form_action6.php\";\n}\n?&gt;\n\n&lt;!DOCTYPE html&gt;\n&lt;html&gt;\n    &lt;head&gt;\n      &lt;title&gt;Bootstrap 5 webform&lt;\/title&gt;\n      &lt;!--\uc774 \ubd80\ubd84\uc740 html\ucf54\uba58\ud2b8 \uc601\uc5ed This part is the html comment area,\ub9c8\uc784\ud0c0\uc785\uc124\uc815 Mime type settings\/\/--&gt;\n      &lt;meta charset=\"utf-8\"&gt;\n      &lt;!-- \ubaa8\ubc14\uc77c\ud3f0 \uc2a4\ud06c\ub9b0 \uc635\uc158 Mobile phone screen options\/\/--&gt;\n      &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"&gt;\n      &lt;!--\ubd80\ud2b8\uc2a4\ud2b8\ub7a95 CDN\ubc29\uc2dd \ub9c1\ud06c Bootstrap 5 CDN method link\/\/--&gt;\n      &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.2.3\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\"&gt;\n      &lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.2.3\/dist\/js\/bootstrap.bundle.min.js\"&gt;&lt;\/script&gt;\n      &lt;!-- \ud3fc\uccb4\ud06c innerHTML\uacbd\uace0 \uba54\uc2dc\uc9c0 \ucd9c\ub825 --&gt;\n      &lt;!-- Form check innerHTML warning message output \/\/--&gt;\n      &lt;script&gt;\n        function frmSubmit(){\n            \n           \/\/name input box\uc5d0\uc11c \uac12\uc744 \uac00\uc838\uc624\uae30\n           \/\/Get value from name input box\n           var frmName     = document.getElementById(\"name\").value;\n           var frmEmail    = document.getElementById(\"email\").value;  \n           var frmWebsite  = document.getElementById(\"website\").value;     \n           var frmTitle    = document.getElementById(\"title\").value;                             \n           var frmPwd      = document.getElementById(\"pwd\").value;\n           var frmComment  = document.getElementById(\"comment\").value;\n\n           \/\/\uc815\uaddc\ud45c\ud604\uc2dd\uacfc \ube44\uad50\ud558\uc5ec \uc774\uba54\uc77c \ubc0f url\ud14c\uc2a4\ud2b8\n           \/\/Test the email and url against the regular expression\n           var regex = \/^&#91;\\w-]+(\\.&#91;\\w-]+)*@(&#91;\\w-]+\\.)+&#91;a-zA-Z]{2,7}$\/;\n           var emailCheck = regex.test(frmEmail); \n           var regexURL = \/^(https?:\\\/\\\/)?(&#91;a-z0-9-]+\\.)+&#91;a-z]{2,7}(\\\/\\S*)?$\/i;\n           var URLCheck = regexURL.test(frmWebsite);\n\n           \/\/ \uc6f9\uc0ac\uc774\ud2b8\uc8fc\uc18c\uac00 \uacf5\ubc31\uc774\uba74 \ud655\uc778\ud558\uc9c0 \uc54a\uc74c.\n           \/\/ If the website field is blank, it does not check.\n           if(frmWebsite == \"\"){\n            URLCheck = true;\n           }           \n\n           \/\/\uc5d0\ub7ec\uba54\uc138\uc9c0 \ucd08\uae30\ud654\n           \/\/Reset error message\n           errorName.innerHTML = \"\";\n           errorEmail.innerHTML = \"\";           \n           errorPwd.innerHTML = \"\";\n           errorWebsite.innerHTML = \"\";\n           errorTitle.innerHTML = \"\";\n           errorComment.innerHTML = \"\";\n           \n           \/\/\uac12\uc758 \uc874\uc7ac \uc5ec\ubd80\uccb4\ud06c ,\uacf5\ubc31\uc774\uba74 \uacbd\uace0\ucc3d \ub744\uc6b0\uae30\n           \/\/Check whether value exists, if blank, display warning window\n           if(frmName == \"\"){\n            errorName.innerHTML =\"&lt;p&gt;\uc774\ub984\uc744 \uc785\ub825\ud558\uc138\uc694(Please Enter Your Name)&lt;\/p&gt;\";\n            return;\n           }else if(frmEmail == \"\"){\n            errorEmail.innerHTML =\"&lt;p&gt;Email\uc744 \uc785\ub825\ud558\uc138\uc694(Please Enter Your Email)&lt;\/p&gt;\";\n            return;\n           }else if(emailCheck == false){   \n            errorEmail.innerHTML =\"&lt;p&gt;\uc815\ud655\ud55c Email\uc744 \uc785\ub825\ud558\uc138\uc694(Please enter the correct Email)&lt;\/p&gt;\";       \n            return; \n           }else if(URLCheck == false){ \n            errorWebsite.innerHTML =\"&lt;p&gt;\uc815\ud655\ud55c URL\uc744 \uc785\ub825\ud558\uc138\uc694(Please enter the correct URL)&lt;\/p&gt;\";       \n            return; \n           }else if(frmTitle == \"\"){\n            errorTitle.innerHTML =\"&lt;p&gt;\uc81c\ubaa9\uc744 \uc785\ub825\ud558\uc138\uc694(Please enter the post title)&lt;\/p&gt;\";\n            return;                                  \n           }else if(frmPwd == \"\"){\n            errorPwd.innerHTML =\"&lt;p&gt;\ud328\uc2a4\uc6cc\ub4dc\ub97c \uc785\ub825\ud558\uc138\uc694(Please Enter Your Password)&lt;\/p&gt;\";\n            return;\n           }else if(frmComment == \"\"){\n            errorComment.innerHTML =\"&lt;p&gt;\uae00\ub0b4\uc6a9\uc744 \uc785\ub825\ud558\uc138\uc694(Please Enter The post content)&lt;\/p&gt;\";\n            return;            \n           }else{\n            frm.submit();\n           }\n        }\n      &lt;\/script&gt;\n    &lt;\/head&gt;\n    &lt;body&gt;  \n    &lt;div class=\"container-sm\"&gt;    \n        &lt;form id=\"frm\" action=\"&lt;?php echo $form_action_name; ?&gt;\" method=\"post\"&gt;\n        &lt;div class=\"mb-3\"&gt;\n            &lt;label for=\"name\" class=\"form-label\"&gt;\uc774\ub984(Name):&lt;\/label&gt;\n            &lt;input type=\"text\" class=\"form-control\" id=\"name\" placeholder=\"\ub2f9\uc2e0\uc758 \uc774\ub984\uc744 \uc785\ub825\ud558\uc138\uc694(Pleas enter your name)\" name=\"name\" required&gt;\n            &lt;div id=\"errorName\"&gt;&lt;\/div&gt;\n        &lt;\/div&gt;\n\n        &lt;div class=\"mb-3\"&gt;\n        &lt;label for=\"email\" class=\"form-label\"&gt;Email:&lt;\/label&gt;\n            &lt;input type=\"text\" class=\"form-control\" id=\"email\" placeholder=\"ID@exmale.com\" name=\"email\" required&gt;\n            &lt;div id=\"errorEmail\"&gt;&lt;\/div&gt;\n        &lt;\/div&gt;\n\n        &lt;div class=\"mb-3\"&gt;\n        &lt;label for=\"website\" class=\"form-label\"&gt;Website:&lt;\/label&gt;\n            &lt;input type=\"text\" class=\"form-control\" id=\"website\" placeholder=\"example.com\" name=\"website\"&gt;\n            &lt;div id=\"errorWebsite\"&gt;&lt;\/div&gt; \n        &lt;\/div&gt;\n        \n        &lt;div class=\"mb-3\"&gt;\n            &lt;label for=\"pwd\" class=\"form-label\"&gt;Title:&lt;\/label&gt;\n            &lt;input type=\"text\" class=\"form-control\" id=\"title\" placeholder=\"\uc81c\ubaa9\uc744 \uc785\ub825\ud558\uc138\uc694(Please enter the post title)\" name=\"title\" required&gt;\n            &lt;div id=\"errorTitle\"&gt;&lt;\/div&gt;\n        &lt;\/div&gt;\n\n        &lt;div class=\"mb-3\"&gt;\n            &lt;label for=\"pwd\" class=\"form-label\"&gt;Password:&lt;\/label&gt;\n            &lt;input type=\"password\" class=\"form-control\" id=\"pwd\" placeholder=\"Enter password\" name=\"pswd\" required&gt;\n            &lt;div id=\"errorPwd\"&gt;&lt;\/div&gt;\n        &lt;\/div&gt;        \n\n        &lt;div class=\"mb-3\"&gt;\n            &lt;label for=\"comment\" class=\"form-label\"&gt;Comment:&lt;\/label&gt;    \n            &lt;textarea id=\"comment\"name=\"comment\" rows=\"5\" cols=\"40\" class=\"form-control\"&gt;&lt;\/textarea&gt;\n            &lt;div id=\"errorComment\"&gt;&lt;\/div&gt;\n        &lt;\/div&gt;\n\n        &lt;div class=\"mb-3\"&gt;\n            &lt;div class=\"form-check mb-3\"&gt;\n            &lt;label class=\"form-check-label\"&gt;Remember me&lt;\/label&gt;\n            &lt;input class=\"form-check-input\" type=\"checkbox\" name=\"remember\"&gt;\n            &lt;\/div&gt;\n        &lt;\/div&gt;\n            &lt;button type=\"button\" class=\"btn btn-primary\" onClick=\"frmSubmit();\"&gt;Submit&lt;\/button&gt;\n        &lt;\/form&gt;\n    &lt;\/div&gt;    \n    &lt;\/body&gt;\n&lt;\/html&gt;   <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>form_action6.php\n\n&lt;?php  \n\nif($_SERVER&#91;'REQUEST_METHOD'] == \"POST\"){\n\n   $f_name = $_POST&#91;'name'];\n   $f_pwd = $_POST&#91;'pswd'];\n   $f_email = $_POST&#91;'email'];\n   $f_title = $_POST&#91;'title'];\n   $f_website = $_POST&#91;'website'];\n   $f_comment = $_POST&#91;'comment'];\n\n   \/\/ post data blank check\n   if($f_name == \"\"){\n    echo (\"&lt;script&gt;\n            alert('\uc774\ub984\uc744 \uc785\ub825\ud558\uc138\uc694(Please Enter Your Name).');\n            window.location.href = '.\/form5-1.php';\n           &lt;\/script&gt;\n        \");\n    exit; \n   }else if($f_email == \"\"){ \n    echo (\"&lt;script&gt;\n           alert('Email\uc744 \uc785\ub825\ud558\uc138\uc694(Please Enter Your Email).');\n           window.location.href = '.\/form5-1.php';\n           &lt;\/script&gt;\n        \");\n    exit;   \n   }else if($f_title == \"\"){ \n    echo (\"&lt;script&gt;\n           alert('\uae00 \uc81c\ubaa9\uc744 \uc785\ub825\ud558\uc138\uc694(Please Enter Your Post Title).');\n           window.location.href = '.\/form5-1.php';\n           &lt;\/script&gt;\n        \");\n    exit;                  \n   }else if($f_comment == \"\"){\n      echo (\"&lt;script&gt;\n              alert('\uae00\ub0b4\uc6a9\uc744 \uc785\ub825\ud558\uc138\uc694(Please Enter The post content).');\n              window.location.href = '.\/form5-1.php';\n             &lt;\/script&gt;\n          \");\n      exit;     \n   }else if($f_pwd == \"\"){\n    echo (\"&lt;script&gt;\n            alert('\ud328\uc2a4\uc6cc\ub4dc\ub97c \uc785\ub825\ud558\uc138\uc694(Please Enter Your Password).');\n            window.location.href = '.\/form5-1.php';\n           &lt;\/script&gt;\n        \");\n    exit;    \n   }   \n\n   \/\/ email check\n   if (!preg_match(\"\/^&#91;\\w-]+(\\.&#91;\\w-]+)*@(&#91;\\w-]+\\.)+&#91;a-zA-Z]{2,7}$\/\",$f_email)) {\n      echo (\"&lt;script&gt;\n            alert('\uc815\ud655\ud55c Email\uc744 \uc785\ub825\ud558\uc138\uc694(Please enter the correct Email).');\n            window.location.href = '.\/form5-1.php';\n            &lt;\/script&gt;\n         \");\n       exit;\n   }\n   \/\/ URL check\n    if ($f_website != \"\" &amp;&amp; !preg_match(\"\/^(https?:\\\/\\\/)?(&#91;a-z0-9-]+\\.)+&#91;a-z]{2,7}(\\\/\\S*)?$\/i\",$f_website)) {\n   echo (\"&lt;script&gt;\n         alert('\uc815\ud655\ud55c URL\uc744 \uc785\ub825\ud558\uc138\uc694(Please enter the correct URL).');\n         window.location.href = '.\/form5-1.php';\n         &lt;\/script&gt;\n      \");\n    exit;\n   }\n\n}\n\n    \/\/ post data\n\n   echo \"REQUEST_METHOD:\".$_SERVER&#91;'REQUEST_METHOD'].\"&lt;br&gt;\";\n   echo \"\uc774\ub984(NAME):\".$f_name.\"&lt;br&gt;\";\n   echo \"\uc774\uba54\uc77c(EMAIL):\".$f_email.\"&lt;br&gt;\";\n   echo \"\uc81c\ubaa9(TITLE):\".$f_title.\"&lt;br&gt;\";\n   echo \"\uc6f9\uc0ac\uc774\ud2b8(WEBSITE):\".$f_website.\"&lt;br&gt;\";\n   echo \"\uae00 \ub0b4\uc6a9(CONTENT):\".$f_comment.\"&lt;br&gt;\";\n   echo \"\ud328\uc2a4\uc6cc\ub4dc(PASSWORD):\".$f_pwd;\n\n   \/\/mysql auth\n  <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-green-color\"> $servername = \"localhost\";\n   $username = \" \";\n   $password = \" \";\n   $dbname = \" \";\n \n  <\/mark> \/\/connect mysql<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-green-color\">\n   $mysqli = new mysqli($servername,$username,$password,$dbname);\n \n<\/mark>   \/\/mysql error check<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-green-color\">\n   if ($mysqli-&gt;connect_errno) {\n       printf(\"Connect failed: %s\\n\", $mysqli-&gt;connect_error);\n       exit();\n   }<\/mark>\n\n<mark style=\"background-color:rgba(0, 0, 0, 0);color:#d7ce1d\" class=\"has-inline-color\">   \/*\n       ** create table **\n       $sql = \"CREATE TABLE IF NOT EXISTS testuser (\n           id int(6) unsigned auto_increment primary key,\n           name varchar(30) not null,\n           email varchar(30) not null,\n           title varchar(30) not null,\n           website varchar(30) not null,\n           pwd varchar(20) not null,\n           comment text ); \";\n\n        $mysqli-&gt;query($sql);\n    *\/<\/mark>\n\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-green-color\">    $sql = \"INSERT INTO testuser (name,email,title,website,pwd,comment) values('$f_name','$f_email','$f_title','$f_website','$f_pwd','$f_comment')\";\n    if($mysqli-&gt;query($sql)){\n        echo \"New record created successfully\";\n    }else{\n        printf(\"Connect failed: %s\\n\", $mysqli-&gt;connect_error);\n        exit();\n    };<\/mark>\n\n   <mark style=\"background-color:rgba(0, 0, 0, 0);color:#d7ce1d\" class=\"has-inline-color\">\/\/ echo (\"&lt;script&gt; window.location.href = '.\/list.php'; &lt;\/script&gt; \");<\/mark>\n\n?&gt;<\/code><\/pre>\n\n\n\n<p>\uc601\uc0c1\uc5d0 \uc0ac\uc6a9\ub41c sql\uba85\ub839\uc5b4(sql command used in video)<\/p>\n\n\n\n<p>mysql log in : mysql -u mysqlID -p mysql database name;<br>\ud14c\uc774\ube14\ubcf4\uae30 : show tables;<br>\ud14c\uc774\ube14 \uad6c\uc870\ubcf4\uae30(View table structure) : desc tablename;<br>\ucd5c\uc2e0 \ub370\uc774\ud130 1\uac1c\ub9cc \uac80\uc0c9(Search for only 1 recent data) : select * from &lt;tablename&gt; order by &lt;primary key&gt; desc limit 1;  <\/p>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/www.facebook.com\/plugins\/video.php?height=314&#038;href=https%3A%2F%2Fwww.facebook.com%2Fgideonslife01%2Fvideos%2F1540915770109397%2F&#038;show_text=false&#038;width=560&#038;t=0\" width=\"560\" height=\"314\" style=\"border:none;overflow:hidden\" scrolling=\"no\" frameborder=\"0\" allowfullscreen=\"true\" allow=\"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share\" allowFullScreen=\"true\"><\/iframe>\n","protected":false},"excerpt":{"rendered":"<p>\uc544\ub798\ub294 form6.php\uc640 form_action6.php\ud30c\uc77c\uc758 \ub0b4\uc6a9\uc785\ub2c8\ub2e4.\uc774\uc804\uc5d0 \ub2e4\ub918\ub358 \ub0b4\uc6a9\uacfc \ub9ce\uc740 \ubd80\ubd84 \uc77c\uce58\ud569\ub2c8\ub2e4.\ub370\uc774\ud130 \ubca0\uc774\uc2a4 \uc785\ub825 \ubd80\ubd84\ub9cc \uc0b4\ud3b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\ub370\uc774\ud130\ubca0\uc774\uc2a4\ub294 MYSQL\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4. Below are the contents of the form6.php and form_action6.php files.This is largely consistent with what we covered previously.Let&#8217;s only look at the database input part.The database we will use is mysql. 1.MYSQL \ub85c\uadf8\uc778 LOGINnew mysqli(&#8220;server host&#8221;,&#8221;username&#8221;,&#8221;password&#8221;,&#8221;databasename&#8221;); \uc774 \ubd80\ubd84\uc774 MYSQL\ub370\uc774\ud130 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-525","post","type-post","status-publish","format-standard","hentry","category-php","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=525"}],"version-history":[{"count":16,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/525\/revisions"}],"predecessor-version":[{"id":584,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/525\/revisions\/584"}],"wp:attachment":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}