Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // connect to the database
- mysql_connect(******************);
- // select the database
- mysql_select_db(*************) or die("Unable to select database");
- $size = count($_POST['bookinfo']);
- $i = 0;
- while ($i < $size) {
- // define each variable
- $bookinfo= $_POST['bookinfo'][$i];
- $id = $_POST['id'][$i];
- $query = "UPDATE Opsta SET Ime = '$bookinfo' WHERE `ID` = '$id' LIMIT 1";
- mysql_query($query) or die ("Error in query: $query");
- ++$i;
- }
- mysql_close();
- include ('index.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement