한 번에 하나의 질문 만 표시하는 설문지를 별도의 페이지에 작성하려고합니다. CGI 파일을 작성하는 방법을 알아낼 수 없습니다. 지금은 한 페이지에 모든 것을 가지고 있지만 내 사용자가 새로운 질문을하기 위해 "다음"버튼을 누르길 원합니다. 나는 이것을 Perl과 HTML로 독점적으로 시도하고있다. 예를 들어 :CGI 스크립트로 페이지 연결하기
use CGI qw(:standard); # Include standard HTML and CGI functions
use CGI::Carp qw(fatalsToBrowser); # Send error messages to browser
#
# Start by printing the content-type, the title of the web page and a heading.
#
print header, start_html("Hello"), h1("Hello");
if (param()) { # If true, the form has already been filled out.
$who = param("myname");
$cats = param("cats"); # Extract the value passed from the form.
if($cats == "Y"){
print p("Hello, your name is $who, and you like cats");
}
else{
print p("Hello, your name is $who, and you don't like cats"); # Print the name.
}
}
else { # Else, first time through so present form.
print start_form();
print p("What's your name? ", textfield("myname"));
print p("Do you like cats? Y for yes and N for no", textfield("cats"));
print p(submit("Submit form"), reset("Clear form"));
print end_form();
}
print end_html;
나는 고양이, 제출 '버튼을 복용하고 다음과 같이 하나 그 기능을 넣어, 다음 페이지에 표시 의문 나는 다른 페이지에있는 버튼을 연결해야 할 또는 원하는 경우 하나의 스크립트에서이를 달성 할 수 있습니까? 간단히 말해 하나의 CGI 스크립트로 설문 조사를 실행하기 위해 여러 HTML 페이지를 만들고 링크 할 수 있습니까?
고맙습니다 집에 오면 곧 확인하겠습니다. –