Guest User

Untitled

a guest
Aug 11th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.82 KB | None | 0 0
  1. Code doesn't execute until button triggered
  2. if(isset($_POST['nametb']) && isset($_POST['usernametb']) && isset($_POST['emailtb']) && isset($_POST['confirmtb']) && isset($_POST['abouttb']) && isset($_POST['interesttb']) && isset($_POST['dreamtb']) && isset($_POST['liketb']) && isset($_POST['schooltb']) && isset($_POST['schoolyrtb']) && isset($_POST['occupationtb']) && isset($_POST['occupationyrtb'])){
  3.  
  4. $select_info = "SELECT * from user_info WHERE id='$user_id'";
  5.  
  6. if($select_info_run = @mysql_query($select_info)){
  7.  
  8. $namedb = mysql_result($select_info_run, 0, 'name');
  9. $usernamedb = mysql_result($select_info_run, 0, 'username');
  10. $emaildb = mysql_result($select_info_run, 0, 'email');
  11. $confirmdb = mysql_result($select_info_run, 0, 'email');
  12. $aboutdb = mysql_result($select_info_run, 0, 'about');
  13. $interestdb = mysql_result($select_info_run, 0, 'interest');
  14. $dreamdb = mysql_result($select_info_run, 0, 'dream');
  15. $likedb = mysql_result($select_info_run, 0, 'like');
  16. $schooldb = mysql_result($select_info_run, 0, 'school');
  17. $schoolyrdb = mysql_result($select_info_run, 0, 'schoolyr');
  18. $occupationdb = mysql_result($select_info_run, 0, 'occupation');
  19. $occupationyrdb = mysql_result($select_info_run, 0, 'occupationyr');
  20.  
  21. }
  22. else{
  23. echo 'Server down :(';
  24. }
  25.  
  26.  
  27. }
  28. else{
  29. echo server down :(';
  30. }
  31.  
  32. <form action="<?php if(isset($current_file)){ echo $current_file; } ?>" method="POST">
  33. <fieldset id="fieldset1">
  34. <legend style="font-family: Ubuntu; font-size:20px;">Info</legend>
  35. <label id="name" title="Name" for="textbox1">Name :</label>
  36. <label id="username" title="UserName" for="textbox2">UserName :</label>
  37. <label id="email" title="Email" for="textbox3">Email :</label>
  38. <label id="confirm" title="Confirm Email" for="textbox4">Confirm :</label>
  39. <br />
  40. <input type="text" id="textbox1" name="nametb" value="<?php if(isset($namedb)){ echo $namedb; } ?>" />
  41. <input type="text" id="textbox2" name="usernametb" value="<?php if(isset($usernamedb)){ echo $usernamedb; } ?>" />
  42. <input type="text" id="textbox3" name="emailtb" value="<?php if(isset($emaildb)){ echo $emaildb; } ?>" />
  43. <input type="text" id="textbox4" name="confirmtb" value="<?php if(isset($confirmdb)){ echo $confirmdb; } ?>" />
  44. <br /><br />
  45. <div id="hrln"><hr /></div>
  46. <label id="about" title="About you" for="textarea1">About :</label>
  47. <label id="interest" title="You are interested in?" for="textarea2">Interested in :</label>
  48. <br />
  49. <textarea id="textarea1" name="abouttb"><?php if(isset($aboutdb)){ echo $aboutdb; } ?></textarea>
  50. <textarea id="textarea2" name="interesttb"><?php if(isset($interestdb)){ echo $interestdb; } ?></textarea>
  51. <br /><br /><br /><br /><br /><hr />
  52. <label id="dream" title="Your Dream?" for="textarea3">Dream :</label>
  53. <label id="like" title="What do you like?" for="textarea4">You like :</label>
  54. <br />
  55. <textarea id="textarea3" name="dreamtb"><?php if(isset($dreamdb)){ echo $dreamdb; } ?></textarea>
  56. <textarea id="textarea4" name="liketb"><?php if(isset($likedb)){ echo $likedb; } ?></textarea>
  57. <br /><br /><br /><br /><br /><hr />
  58. <label id="education" title="Your school" for="textbox5">School | University :</label>
  59. <label id="educationyr" title="Year" for="textbox6">Year :</label>
  60. <br />
  61. <input type="text" name="schooltb" id="textbox5" value="<?php if(isset($schooldb)){ echo $schooldb; } ?>" />
  62. <input type="text" name="schoolyrtb" id="textbox6" value="<?php if(isset($schoolyrdb)){ echo $schoolyrdb; } ?>" />
  63. <br /><br /><hr />
  64. <label id="occupation" title="Occupation" for="textbox7">Occupation :</label>
  65. <label id="occupationyr" title="Year" for="textbox6">Year :</label>
  66. <br />
  67. <input type="text" id="textbox7" name="occupationtb" value="<?php if(isset($occupationdb)){ echo $occupationdb; } ?>" />
  68. <input type="text" id="textbox8" name="occupationyrtb" value="<?php if(isset($occupationyrdb)){ echo $occupationyrdb; } ?>" />
  69. <br /><br /><hr />
  70. <label id="passwords" title="For Security Purpose" for="textbox9">Password :</label>
  71. <input type="password" id="textbox9" name="passwordstb" />
  72. <input type="submit" value="Save Info Modification" name="save" id="button1" />
  73. <input type="submit" value="Cancel Info Modification" name="cancel" id="button2" />
  74. </fieldset>
  75. </form>
  76.  
  77. if(isset($_POST['nametb']) && isset($_POST['usernametb']) && isset($_POST['emailtb']) &&
  78. isset($_POST['confirmtb']) && isset($_POST['abouttb']) && isset($_POST['interesttb']) &&
  79. isset($_POST['dreamtb']) && isset($_POST['liketb']) && isset($_POST['schooltb']) &&
  80. isset($_POST['schoolyrtb']) && isset($_POST['occupationtb']) &&
  81. isset($_POST['occupationyrtb'])){
Add Comment
Please, Sign In to add comment