2017-01-15 13 views
0

何らかの理由で私のPHPは何もしないようですか? 私はエラーや何もしない何かを得ていません。私のPHPは動作しませんが、エラーは返されません

ヘッダを入れようとしましたが、何もしませんでした 私はxamppを使用しています。http://ではなく、file:// のPHPコードです。

<?php 
if(!(isset($_POST['submit']))) { 
    session_start(); 
    $firstimgsrc = $_POST['firstimgsrc']; 
    if ($firstimgsrc == "") { 
     echo "w/e"; 
    } else { 
     $_SESSION['firstimgsrc'] = $firstimgsrc; 
    } 
    $secondimgsrc = $_POST['secondimgsrc']; 
    if ($secondimgsrc == "") { 
     echo "w/e"; } else { 
     $_SESSION['secondimgsrc'] = $secondimgsrc; 

    } 
    $thirdimgsrc = $_POST['thirdimgsrc']; 

    if ($thirdimgsrc == "") { 
     echo "w/e"; 
    } else { 
    $_SESSION['thirdimgsrc'] = $thirdimgsrc; 
} 
    $forthimgsrc = $_POST['forthimgsrc']; 
    if ($forthimgsrc == "") { 
     echo "w/e"; 

    } else { 
     $_SESSION['forthimgsrc'] = $forthimgsrc; 
    } 
    header("Location: ../egamingtv.php"); 
} 

?> 

と部分のHTMLコード:

<form method="post" action="changecontent.php"> 
       <div class="champs"> 

        <img id="firstimg" src=""> 
        <input name="firstimgsrc"> 
        <input id="firstchamp" value="" style="background-color: transparent;border: 0px;" disabled="yes"> 
        <input id="firstdate" style="background-color: transparent;border: 0px;" value="" disabled="yes"></div> 
       <div class="champs"> 
        <img id="secondimg" src=""> 
        <input name="secondimgsrc"> 
        <input id="secondchamp" style="background-color: transparent;border: 0px;" value="" disabled="yes"> 
        <input id="seconddate" style="background-color: transparent;border: 0px;" value="" disabled="yes"> 
       </div> 
       <div class="champs"> 
        <img id="thirdimg" src=""> 
        <input name="thirdimgsrc"> 
        <input id="thirdchamp" style="background-color: transparent;border: 0px;" value="" disabled="yes"> 
        <input id="thirddate" style="background-color: transparent;border: 0px;" value="" disabled="yes"></div> 
       <div class="champs"> 
        <img id="forthimg" src=""> 
        <input name="forthimgsrc"> 
        <input id="forthchamp" style="background-color: transparent;border: 0px;" value="" disabled="yes"> 
        <input id="forthdate" style="background-color: transparent;border: 0px;" value="" disabled="yes"> 
       </div> 
       <div> 
        <input type="submit" value="submit" name="submit" > 
       </div> 
      </form> 
+0

あなたは実際に何を得ますか? – Sentry

+0

@Deceptionここでやったことはしないでください。あなたの質問テキストをそのままにして、サイトが質問を終わらせるようにしてください。 *または*少し時間を掛けて尋ねることを避けることができた小さな問題だった場合(またはそれが簡単ではないが簡単な修正があった場合:自分で回答を投稿する)、質問を削除してください。あなたがすべきではないことは、あなたの投稿を編集して、突然それにテキストがないようにすることです。この場合、あなたは問題を解決する答えを持っていた:upvoteとそれを受け入れる。 (そしてSOコミュニティが投票したときに「閉鎖」してみましょう。それを考慮する必要はありません) –

答えて

3

if文はこのようにする必要があり、ここで

if(!(isset($_POST['submit']))) { 
^see this NOT sign 

をこの行を参照してください。期待されている何

if(isset($_POST['submit'])) { 
関連する問題