lsy0314 / sintoburi

:fish: 신토불이 - 우리 몸에는 우리 땅에서 자란 전통음식이 체질에 잘맞고 건강에 이롭다라는 뜻을 가지고 있습니다.
3 stars 2 forks source link

[버그/완료] 회원가입시 한글 깨짐 #64

Open hjoon0510 opened 5 years ago

hjoon0510 commented 5 years ago

image

hjoon0510 commented 5 years ago

https://github.com/lsy0314/sintoburi/issues/19 solution

hjoon0510 commented 5 years ago

해결코드

git diff
diff --git a/webapp/user_signup_do.php b/webapp/user_signup_do.php
index 7758ecc..fc192df 100644
--- a/webapp/user_signup_do.php
+++ b/webapp/user_signup_do.php
@@ -2,6 +2,7 @@
 require("./menu2.php");
 include('webapp_config.php');
 $mysqli=mysqli_connect($db_host,$db_user,$db_pass,$db_name);
+mysqli_query($mysqli, "SET NAMES utf8");
 ?>

 <?php
@@ -28,6 +29,7 @@ if($id==NULL || $pw==NULL || $name==NULL || $email==NULL) //
 include('webapp_config.php');

 $mysqli=mysqli_connect($db_host,$db_user,$db_pass,$db_name);
+mysqli_query($mysqli, "SET NAMES utf8");

 $check="SELECT *from store_info WHERE id='$id'";
 $result=$mysqli->query($check);

해결후

image