Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <?php
  4. session_start();
  5. // Connect to the DB
  6. try{
  7. $bdd = new PDO('mysql:host=localhost;dbname=testlp', 'root', '');
  8. } catch (Exception $e){
  9. die('Erreur : ' . $e->getMessage());
  10. }
  11. ?>
  12.  
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  15. <script type="text/javascript" src="./jquery-1.7.min.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(function(){
  18. $('.del').live('click',function(){
  19. $(this).parent().parent().remove();
  20. });
  21. $('.add').live('click',function(){
  22. $(this).val('Delete');
  23. $(this).attr('class','del');
  24. var appendTxt = "<tr><td><input type='text' name='input_box_one[]' /></td> <td><input type='text' name='input_box_two[]' /></td> <td><input type='button' class='add' value='Add More' /></td></tr>";
  25. $("tr:last").after(appendTxt);
  26. });
  27. });
  28. </script>
  29. </head>
  30.  
  31. <html>
  32. <body>
  33. <table id="options-table">
  34. <tr>
  35. <td>name</td>
  36. <td>client</td>
  37. <td>&nbsp;</td>
  38. </tr>
  39. <tr>
  40. <td><input type="text" name="input_box_one[]" /></td>
  41. <td><input type="text" name="input_box_two[]" /></td>
  42. <td><input type="button" class="add" value="Add More" /></td>
  43. </tr>
  44. </table>
  45. <td><input type="button" class="finish" value="finish him" /></td>
  46. </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement