<?php
$spacen
echo $spacen;
?>
라는 php 를 만들어 놓은 다음에
localhost/sample.php?spacen=sir
하면 화면에 sir 가 출력되는게 맞나요?
이걸 활용해서 php 문 안에서 변수값을 안 넣고
url에 따라
<?php
$spacen
if (spacen == sir){
echo "spacen is" + $spacen ;
?>
이런식으로 실행이 가능한가요?
댓글 4개
12년 전
<?php
$spn = $_GET['spacen']; //get으로 넘어올때
$spn = $_POST['spacen'];//post로 넘어올때
if ($spn == sir){
echo "spacen is" + $spn ;
}
?>
이렇게 하시면 됩니다^^
$spn = $_GET['spacen']; //get으로 넘어올때
$spn = $_POST['spacen'];//post로 넘어올때
if ($spn == sir){
echo "spacen is" + $spn ;
}
?>
이렇게 하시면 됩니다^^
12년 전
<?php
$spacen = $_GET['spacen'];
if ($spacen == "sir"){
echo "spacen is" + $spacen ;
?>
$spacen = $_GET['spacen'];
if ($spacen == "sir"){
echo "spacen is" + $spacen ;
?>
가오가이거
12년 전
<?php
$spacen = null;
if (array_key_exists('spacen', $_GET) {
$spacen = $_GET['spacen'];
}
if ($spacen === 'sir') {
echo "spacen is" . $spacen;
}
값의 존재 유무도 체크하는게 좋습니다. 없는 값을 뽑을 수는 없으니까요.
$spacen = null;
if (array_key_exists('spacen', $_GET) {
$spacen = $_GET['spacen'];
}
if ($spacen === 'sir') {
echo "spacen is" . $spacen;
}
값의 존재 유무도 체크하는게 좋습니다. 없는 값을 뽑을 수는 없으니까요.
12년 전
겟으로 받으셔야 될텐데요 ㅎ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 6630 |
차가운바람
|
12년 전 | 1160 | |
| 6629 | 12년 전 | 1157 | ||
| 6628 |
put777
|
12년 전 | 642 | |
| 6627 |
|
12년 전 | 698 | |
| 6626 | 12년 전 | 1616 | ||
| 6625 |
|
12년 전 | 718 | |
| 6624 |
미켈란젤로의왼손
|
12년 전 | 482 | |
| 6623 |
|
12년 전 | 1043 | |
| 6622 | 12년 전 | 1392 | ||
| 6621 |
차가운바람
|
12년 전 | 631 | |
| 6620 | 12년 전 | 732 | ||
| 6619 |
|
12년 전 | 969 | |
| 6618 | 12년 전 | 1741 | ||
| 6617 | 12년 전 | 639 | ||
| 6616 |
차가운바람
|
12년 전 | 894 | |
| 6615 | 12년 전 | 2853 | ||
| 6614 | 12년 전 | 614 | ||
| 6613 |
강명구베드로
|
12년 전 | 530 | |
| 6612 |
|
12년 전 | 426 | |
| 6611 | 12년 전 | 1206 | ||
| 6610 | 12년 전 | 1022 | ||
| 6609 | 12년 전 | 3679 | ||
| 6608 |
|
12년 전 | 831 | |
| 6607 | 12년 전 | 694 | ||
| 6606 | 12년 전 | 565 | ||
| 6605 | 12년 전 | 457 | ||
| 6604 | 12년 전 | 976 | ||
| 6603 |
geektoo
|
12년 전 | 703 | |
| 6602 | 12년 전 | 841 | ||
| 6601 | 12년 전 | 364 | ||
| 6600 | 12년 전 | 407 | ||
| 6599 | 12년 전 | 553 | ||
| 6598 | 12년 전 | 938 | ||
| 6597 | 12년 전 | 939 | ||
| 6596 | 12년 전 | 425 | ||
| 6595 | 12년 전 | 794 | ||
| 6594 | 12년 전 | 4576 | ||
| 6593 | 12년 전 | 2579 | ||
| 6592 | 12년 전 | 829 | ||
| 6591 | 12년 전 | 587 | ||
| 6590 |
|
12년 전 | 1397 | |
| 6589 | 12년 전 | 770 | ||
| 6588 |
GINUSSOFT
|
12년 전 | 5130 | |
| 6587 | 12년 전 | 6215 | ||
| 6586 | 12년 전 | 1049 | ||
| 6585 | 12년 전 | 807 | ||
| 6584 | 12년 전 | 468 | ||
| 6583 |
|
12년 전 | 985 | |
| 6582 | 12년 전 | 871 | ||
| 6581 | 12년 전 | 841 | ||
| 6580 | 12년 전 | 618 | ||
| 6579 |
알랑가몰라
|
12년 전 | 931 | |
| 6578 | 12년 전 | 1335 | ||
| 6577 | 12년 전 | 1503 | ||
| 6576 |
경dragon
|
12년 전 | 774 | |
| 6575 | 12년 전 | 1889 | ||
| 6574 | 12년 전 | 687 | ||
| 6573 | 12년 전 | 989 | ||
| 6572 |
|
12년 전 | 1669 | |
| 6571 |
CTOMAN
|
12년 전 | 1965 | |
| 6570 | 12년 전 | 1733 | ||
| 6569 | 12년 전 | 1893 | ||
| 6568 | 12년 전 | 2409 | ||
| 6567 | 12년 전 | 1033 | ||
| 6566 |
lainfox
|
12년 전 | 1535 | |
| 6565 | 12년 전 | 3657 | ||
| 6564 |
제주프라이스
|
12년 전 | 1541 | |
| 6563 | 12년 전 | 1576 | ||
| 6562 |
프로프리랜서
|
12년 전 | 1351 | |
| 6561 |
프로프리랜서
|
12년 전 | 969 | |
| 6560 |
프로프리랜서
|
12년 전 | 1225 | |
| 6559 |
프로프리랜서
|
12년 전 | 1141 | |
| 6558 |
프로프리랜서
|
12년 전 | 1360 | |
| 6557 |
프로프리랜서
|
12년 전 | 1984 | |
| 6556 |
프로프리랜서
|
12년 전 | 1531 | |
| 6555 |
프로프리랜서
|
12년 전 | 1372 | |
| 6554 |
프로프리랜서
|
12년 전 | 3895 | |
| 6553 |
프로프리랜서
|
12년 전 | 1516 | |
| 6552 | 12년 전 | 847 | ||
| 6551 |
왕초보sasa
|
12년 전 | 1543 | |
| 6550 |
왕초보sasa
|
12년 전 | 639 | |
| 6549 |
왕초보sasa
|
12년 전 | 912 | |
| 6548 | 12년 전 | 1302 | ||
| 6547 | 12년 전 | 1200 | ||
| 6546 | 12년 전 | 5162 | ||
| 6545 | 12년 전 | 2521 | ||
| 6544 |
AnnieK
|
12년 전 | 1783 | |
| 6543 |
베르무트7
|
12년 전 | 648 | |
| 6542 |
오늘도망했다
|
12년 전 | 2236 | |
| 6541 | 12년 전 | 819 | ||
| 6540 | 12년 전 | 1138 | ||
| 6539 | 12년 전 | 852 | ||
| 6538 |
senseme
|
12년 전 | 3380 | |
| 6537 | 12년 전 | 781 | ||
| 6536 | 12년 전 | 3670 | ||
| 6535 | 12년 전 | 1351 | ||
| 6534 | 12년 전 | 1624 | ||
| 6533 | 12년 전 | 2246 | ||
| 6532 |
냐옹이사범
|
12년 전 | 2308 | |
| 6531 | 12년 전 | 571 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기