Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form id='students' method='post' class="form-horizontal no-margin" name='students' action='manage_shows.php'>
- <input type='checkbox' class='case'/>
- <select id='first_name' name='first_name[]'>
- <option value="10:00 AM">10:00 AM</optio
- <option value="11:00 AM">11:00 AM</option> <option value="12:00 PM">12:00 PM</option>
- </select>
- <select type="text" id='last_name' name='last_name[] '>
- <option value="10:00AM">10:00 AM</option> <option value="11:00AM">11:00 AM</option>
- <option value="12:00PM">12:00 PM</option>
- </select>
- <input id="input" class="input-small" type="text" id='tamil' name='tamil[]' >
- <input id="input" class="input-small" type="text" id='english' name='english[]' >
- <input id="input" class="input-small" type="text" id='computer' name='computer[]' >
- <input type='submit' name='submit' value='submit'>
- </form>
- db
- <?php
- include('config.php');
- if (isset($_POST['submit'])) {
- foreach($_POST as $varname => $value) {
- $sql = "INSERT INTO `shows` ( `from` , `to` , `seats` , `cost` , `screen` ) VALUES( '{$_POST['first_name']}' , '{$_POST['last_name']}' , '{$_POST['tamil']}' , '{$_POST['english']}' , '{$_POST['computer']}' ) ";
- print_r($key);
- print_r($value);
- }
- mysql_query($sql) or die(mysql_error());
- echo $sql;
- //echo "Added row.<br />";
- //echo "<a href='list.php'>Back To Listing</a>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement