Advertisement
Guest User

Untitled

a guest
Sep 6th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. <form id='students' method='post' class="form-horizontal no-margin" name='students' action='manage_shows.php'>
  2. <input type='checkbox' class='case'/>
  3. <select id='first_name' name='first_name[]'>
  4. <option value="10:00 AM">10:00 AM</optio
  5. <option value="11:00 AM">11:00 AM</option> <option value="12:00 PM">12:00 PM</option>
  6. </select>
  7.  
  8. <select type="text" id='last_name' name='last_name[] '>
  9. <option value="10:00AM">10:00 AM</option> <option value="11:00AM">11:00 AM</option>
  10. <option value="12:00PM">12:00 PM</option>
  11. </select>
  12.  
  13. <input id="input" class="input-small" type="text" id='tamil' name='tamil[]' >
  14. <input id="input" class="input-small" type="text" id='english' name='english[]' >
  15. <input id="input" class="input-small" type="text" id='computer' name='computer[]' >
  16.  
  17. <input type='submit' name='submit' value='submit'>
  18. </form>
  19.  
  20. db
  21. <?php
  22. include('config.php');
  23. if (isset($_POST['submit'])) {
  24. foreach($_POST as $varname => $value) {
  25. $sql = "INSERT INTO `shows` ( `from` , `to` , `seats` , `cost` , `screen` ) VALUES( '{$_POST['first_name']}' , '{$_POST['last_name']}' , '{$_POST['tamil']}' , '{$_POST['english']}' , '{$_POST['computer']}' ) ";
  26. print_r($key);
  27. print_r($value);
  28. }
  29. mysql_query($sql) or die(mysql_error());
  30. echo $sql;
  31. //echo "Added row.<br />";
  32. //echo "<a href='list.php'>Back To Listing</a>";
  33.  
  34. }
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement