Advertisement
booruguru

editlink.php

Dec 31st, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.02 KB | None | 0 0
  1. <?php
  2. require_once("models/config.php");
  3. include('../base.php');
  4. ?>
  5. </head>
  6. <body>
  7.  
  8.    
  9. <?php
  10. $UID = $_GET['id'];
  11. $query = mysql_query("SELECT * FROM Klipbook_Links WHERE Link_ID = '$UID'") or die(mysql_error());
  12.  
  13. if(mysql_num_rows($query)>=1){
  14.     while($row = mysql_fetch_array($query)) {
  15.         $linktitle = $row['Link_Title'];
  16.         $linkowner = $row['Link_Owner'];    
  17.         $linkid = $row['Link_ID'];
  18.        
  19.        
  20.     }
  21. ?>
  22. <form action="updatelink.php" method="post">
  23. <input type="text" name="ud_linktitle" value="<?=$linktitle?>">
  24.  
  25. <input type="hidden" name="ID" value="<?=$UID;?>">
  26. <br><input type="hidden" name="ud_linkowner" value="<?=$linkowner;?>">
  27. <input type="hidden" name="ud_linkid" value="<?=$linkid;?>">
  28. <input class="btn" type="Submit" value="SAVE"> <a class="btn btn-danger" href="deletelink.php?id=<?php echo $UID; ?>" target="_top">DELETE</a>
  29.  
  30. </form>
  31.  
  32. <?php
  33. }else{
  34.     echo 'No entry found. <a href="javascript:history.back()">Go back</a>';
  35. }
  36. ?>
  37. </body>
  38. </html>
  39. <?php
  40. require_once("models/config.php");
  41. include('../base.php');
  42. ?>
  43. </head>
  44. <body>
  45.  
  46.    
  47. <?php
  48. $UID = $_GET['id'];
  49. $query = mysql_query("SELECT * FROM Klipbook_Links WHERE Link_ID = '$UID'") or die(mysql_error());
  50.  
  51. if(mysql_num_rows($query)>=1){
  52.     while($row = mysql_fetch_array($query)) {
  53.         $linktitle = $row['Link_Title'];
  54.         $linkowner = $row['Link_Owner'];    
  55.         $linkid = $row['Link_ID'];
  56.        
  57.        
  58.     }
  59. ?>
  60. <form action="updatelink.php" method="post">
  61. <input type="text" name="ud_linktitle" value="<?=$linktitle?>">
  62.  
  63. <input type="hidden" name="ID" value="<?=$UID;?>">
  64. <br><input type="hidden" name="ud_linkowner" value="<?=$linkowner;?>">
  65. <input type="hidden" name="ud_linkid" value="<?=$linkid;?>">
  66. <input class="btn" type="Submit" value="SAVE"> <a class="btn btn-danger" href="deletelink.php?id=<?php echo $UID; ?>" target="_top">DELETE</a>
  67.  
  68. </form>
  69.  
  70. <?php
  71. }else{
  72.     echo 'No entry found. <a href="javascript:history.back()">Go back</a>';
  73. }
  74. ?>
  75. </body>
  76. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement