• I have a form that contains 240 records; one field is a mysql date field and another field contains the weeknumber of that date field.
    In that form I change 1 or more dates and then post the form with this code:
    <form method="post" action="<phpcode><?php echo esc_attr($_SERVER['REQUEST_URI']); ?></phpcode>" name="wijzigfanion">
    After posting I check what is posted with:
    print_r($_POST);
    For the date array I get this:

    Array
    (
    [datum] => Array
    (
    [0] => 2016-09-08
    [1] => 2016-09-04
    [2] => 2016-09-03
    [3] => 2016-09-04
    [4] => 2016-09-04
    [5] => 2016-09-04
    [6] => 2016-09-03
    [7] => 2016-09-04
    
    )
    )

    Now I want to assign the right weeknumber to every date so that I do not have to change the weeknumber and the changed table can be updated with the new values.
    But the code:
    $week = date("W",$datum);
    is not working.

    What do I wrong?

    • This topic was modified 8 years, 2 months ago by Jan Dembowski.
  • The topic ‘PHP Parse error.’ is closed to new replies.