For some reason i'm not passing any get parameters. Is my syntax out? (line 33)
I'm using dreamweaver's syntax highlighter and it isn't showing any errors.
The form takes me to: URL/update_win.php? (note no 'id= ? '
Any help would be great.
<?php //connection if ($mysqli->connect_error) { die('Connect Error: ' . $mysqli->connect_error); } $query = "SELECT id, date, horse, course, odds, time, tip, description FROM toptips order by date desc"; $result = $mysqli->query($query); while($row = $result->fetch_array()) { $rows[] = $row; } foreach($rows as $row) { $date = $row['date']; $date = date("d/m/y", strtotime($date)); $id = $row['id']; echo '<div style= "width:600px;"> <div style="float:left; width:400px; margin-bottom:10px; margin-top10px;"> ('.$date.") " . $row['time'] . " " . $row['course'] . " - " . $row['horse'] . " " . $row['odds'] . " " . '<img src="' . $row['tip'] . '.png" alt=" '. $row['tip'] .' " height="42" width="42" style="float:right"><br>'. $row['description'] . '</div> <div style= "float:right; width: 50px; margin-left:150px;"> <form method="get" action="update_win.php?id='.$id.'"> <input type="submit" value="add win"/> </form> </div> </div> <div style="clear:both"/> <hr/>' ; } $result->close(); $mysqli->close(); ?>