How to insert selected data into new table using php mysql -
i need code on how insert data file "continue_sel.php" new table. please read attached code below. advice appreciated. best regards.
new table format:
id-gdate-parlay1-gdate-parlay2-........gdate-parlay5-amount
continue_sel.php
<?php include_once 'include/function_define.php'; connect(); ?> <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- above 3 meta tags *must* come first in head; other head content must come *after* these tags --> <!-- bootstrap --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> <link href="datatables.bootstrap.min.css" rel="stylesheet"> <!-- html5 shim , respond.js ie8 support of html5 elements , media queries --> <!-- warning: respond.js doesn't work if view page via file:// --> <!--[if lt ie 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"> </script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <div class="container"> <form method="post" action="confirm_wager.php"> <h1>game time</h1> <table class="table table-striped table-hover table-condensed" id="tabledata"> <tr class="info"> <th width=5%>no.</th> <th width=10%>date: </th> <th>team: </th> </tr> <tbody> <?php if (isset($_post['checkbox'])) { echo "<br/><h4> wager type: parlay (" . count($_post['checkbox']) . " teams)</h4> "; $strdisplay = mysql_query("select gdate, concat(category, ' [', srotnum, '] ', teamname, ' ', spread) parlay oddset srotnum in ('".implode("','", $_post['checkbox'])."')"); $num_rows = 0; while ($strrec = mysql_fetch_array($strdisplay)) { $num_rows++; ?> <tr> <td><?php echo $num_rows ?></td> <td><?php echo $strrec['gdate'] ?></td> <td><?php echo $strrec['parlay']?></td> </tr> <?php } } ?> </tbody> </table> <table width="100%" class="table table-striped table-condensed"> <tr> <td width="70%"></td> <td width="30%"> <div class="form-group"> <label class="sr-only" for="exampleinputamount">amount (in dollars)</label> <div>please enter amount below</div> <div class="input-group"> <div class="input-group-addon">$</div> <input type="text" class="form-control" id="inputamount" placeholder="amount"> <div class="input-group-addon">.00</div> </div> </div> <button type="submit" name="confirm_wager" id="confirm_wager" class="btn btn-primary">confirm</button> <button type="button" name="cancel" value="cancel" class="btn btn-primary" onclick="javascript:window.location='index3.php';" >cancel wager</button> </td> </tr> </table> </form> <?php exit(); ?> </div>
Comments
Post a Comment