date_deliv.php
<?php ?> <style type="text/css" media="all"> <!-- @import url("style.css"); --> </style> <div id="menu"><?php include ('menu.php') ?></div> <div id="body"> <?php include ('connect.php'); if ($_POST['numer'] <>'') { $pole = $_POST['numer']; $_SESSION['nk'] = $pole; } if( $_SESSION['login'] <>''){ $nk=$_SESSION['nk']; include('query.php'); $result = mssql_query($query15); $count=mssql_num_rows($result); if($count > 0) { /* jeżeli wynik jest pozytywny, to wyświetlamy dane */ include('print_portal.php'); } } mssql_close($dbhandle); include('footer.php'); ?> </div> </form>
oraz
print_portal.php
<?php while($r = mssql_fetch_assoc($result)) { include('kolor.php'); } echo "<tr><td colspan='4' align='center'><input type='submit' name='Submit' value='Submit'></td></tr>"; $count=mssql_num_rows($result); if($Submit){ for($i=0;$i<$count;$i++){ $query22="UPDATE [PORTAL].[dbo].[IT_TEST] SET data_dostawy = '$date_of_deliv[$i]' ,ilosc_dostawy = '$quan_of_deliv[$i]' WHERE ID = '$id[$i]'"; $result22=mssql_query($query22); } } // if($result22){ // header("location:date_deliv.php"); // } ?>
Niby wszystko ok.
Po wciśnięciu przycisku submit nie wywala błędów, ale nie wprowadza danych do bazy.
DLACZEGO??