2013-05-19 2 views
0

누군가이 페이지를 열 때 아무 것도 표시되지 않는 이유를 말해 줄 수 있습니까?출력이 표시되지 않습니다.

if (!empty($action)) 
+2

은'$ action'이 비 었습니까? – billyonecan

+2

'if (isset ($ _ POST [ "action"])) {...}'를 사용하지 않는 이유는 무엇입니까? – Aquillo

+0

어쩌면 $ _POST [ 'action'] 설정되어 있습니다 – Sam

답변

0

은 아마 당신은 이런 식으로 뭔가를 찾고 있습니다
<form style = "display:none"> 

표시되지 않습니다 .. 스타일을 제거하거나 바꾸기 style = "display: block" 또는 무엇이든 필요합니다.

1

차라리 형태

include_once("functions.php"); 
// Process 
if(!isset($_POST["action"])) 
{ 
    // Send back the contact form HTML 
    echo "<form action='#'> 
      <label for='image'>upload: </label> 
      <input type='file' id='image' name='image' maxlength=50>"; 
} 
1
에 표시하지 않도록 그렇지 않으면 당신은 속성으로 할당합니다 직접 if isset를 사용하고 style='display:none'을 제거하는 것입니다 :
<?php 

include_once("functions.php"); 
// Process 
$action = isset($_POST["action"]) ? $_POST["action"] : ""; 
if (empty($action)) 
{ 
    // Send back the contact form HTML 
    $output = "<form action='#' style='display:none'> 
       <label for='image'>upload: </label> 
       <input type='file' id='image' name='image' maxlength=50>"; 
} 
echo $output; 
?> 
관련 문제