piadream

멤버십 탈퇴할때 탈퇴문구 넣기 그러나 왜 단일?

· 2023-03-13 (월) 09:03:23 · 1645

$sql="select * from rand_data"; <- 단어 등록을 많이 하면 할수록 ~ 강제로 데이터 깨기 어렵다.

$result=mysqli_query($connect,$sql);

$total=mysqli_num_rows($result);

$rand=rand(1,$total);

$rand_src="select * from rand_data where rand_number like $rand limit 1"; <-limit 1의 뜻은 쉽고.

$rand_code=mysqli_query($connect,$rand_src);

while($rander=mysqli_fetch_assoc($rand_code)) {

$rand_string=stripslashes($rander['rand_string']);

$rand_value=stripslashes($rander['rand_value']);

}

echo $rand_string; <- 문자열

echo $rand_value; <- 문자열 입력된 번호 | 예) 1 세종 2 한글 3 말모이 .......

|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
기타 23-07-03 조회 1,828
MySQL 23-07-02 조회 2,287
JavaScript 23-07-01 조회 1,926
PHP 23-06-30 조회 2,923
MySQL 23-06-29 조회 7,741
node.js 23-06-28 조회 1,964
node.js 23-06-27 조회 1,508
PHP 23-06-26 조회 1,732
PHP 23-06-25 조회 1,769
PHP 23-06-24 조회 1,243
PHP 23-06-22 조회 1,537
PHP 23-06-20 조회 1,634
기타 23-06-19 조회 1,898
23-06-17 조회 1,273
기타 23-06-18 조회 2,340
PHP 23-06-17 조회 1,628
JavaScript 23-06-16 조회 2,326
PHP 23-06-15 조회 2,002
23-05-16 조회 1,210
기타 23-06-13 조회 1,686
PHP 23-06-05 조회 1,726
PHP 23-05-28 조회 2,052
기타 23-05-23 조회 2,384
PHP 23-05-19 조회 1,850
PHP 23-05-18 조회 2,009
PHP 23-05-08 조회 2,038
JavaScript 23-04-10 조회 1,731
MySQL 23-04-08 조회 1,967
MySQL 23-03-15 조회 1,980
PHP 23-03-14 조회 2,374