XAMPP 1.7.4 (PHP 5.3.5) giving error

Discussion in 'PHP' started by KingCobra, Sep 18, 2011.

  1. #1
    I am using XAMPP 1.7.3 and created a php page that results without any error.
    I uploaded the file to my real server and its work ok.

    But When I run that php file on XAMPP 1.7.4 then I got error and it also result me wrongly.

    One of the errors is -
    <input type="text" name="date" size="20" value="<?php echo $_POST['date']; ?>">

    It was expected that the input field would remain blank until the form post. It works on XAMPP 1.7.3 (maybe lower virsion php) but on XAMPP 1.7.4 shows error text on that input field and also other error text. It also give me lots of result rows instead of only 12.

    I don't what is the problem, but I think my code is ok and I also think that newer virsion of XAMPP or PHP has bugs.

    PLEASE HELP
     
    KingCobra, Sep 18, 2011 IP
  2. MyVodaFone

    MyVodaFone Well-Known Member

    Messages:
    1,048
    Likes Received:
    42
    Best Answers:
    10
    Trophy Points:
    195
    #2
    
    <?php
    
    if(isset($_POST['date'])) { 
    
      $date = $_POST['date'];
    }
    
    ?>
    
    <input type="text" name="date" size="20" value="<?php echo $date; ?>">
    
    PHP:
     
    MyVodaFone, Sep 18, 2011 IP