i nd help in update n delete on php.

Reply

Join Date: Dec 2008
Posts: 2
Reputation: an_an is an unknown quantity at this point 
Solved Threads: 0
an_an an_an is offline Offline
Newbie Poster

i nd help in update n delete on php.

 
0
  #1
Dec 8th, 2008
i nd help in php cos i met error- Fatal error: Call to a member function bind_param() on a non-object in C:\xampp\htdocs\WAD_Project\userprofile.php on line 19.
which i dun uds n cant solve after tryin. plz reply n help ty. if thr any other info u nd frm me to solve my problem, feel free to reply to tis thread too. below r sum of my codings for my userprofile.php :

  1. <html>
  2.  
  3. <head>
  4. <title>User Profile</title>
  5. </head>
  6. <body>
  7.  
  8. <?php
  9. //TODO 0: get user's email
  10. $email = $_GET['email'];
  11.  
  12. //TODO 1: Connect to kagdbdb database
  13. $mysqli = new mysqli("localhost", "root", null, "kagdb");
  14.  
  15. //TODO 2: Prepare the statement to select user
  16. $stmt = $mysqli->prepare("Select password, address, contactno, from user where email=?");
  17.  
  18. //TODO 3: Bind the values
  19. $stmt->bind_param("s", $email);
  20.  
  21. //TODO 4: Execute the statement
  22. $stmt->execute();
  23.  
  24. //TODO 5: bind results into $password, $address ,$contactno and $email
  25. $stmt->bind_result($password, $address, $contactno, $email);
  26.  
  27. //TODO 6: fetch the result
  28. $stmt->fetch();
  29.  
  30. //TODO 7: close the statement
  31. $stmt->close();
  32.  
  33. //TODO 8: close $mysqli
  34. $mysqli->close();
  35.  
  36.  
  37. ?>
  38.  
  39. <form action="userupdate.php" method="post">
  40. <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100px;">
  41. <tr>
  42. <td style="width: 100%; height: 20%;">
  43.  
  44. </td>
  45. </tr>
  46. <tr>
  47. <td style="width: 100%; height: 70%;">
  48.  
  49. <h2>User Profile</h2>
  50.  
  51. <fieldset>
  52. <legend>Edit your profile in the form below:</legend>
  53.  
  54.  
  55. <!--TODO 9: Fill in the values for each of the input fields so that data is displayed-->
  56.  
  57.  
  58. <p>
  59. <b>Password:</b>
  60. <input type="password" name="password" size="15" maxlength="8" value=""/>
  61. </p>
  62.  
  63.  
  64. <p>
  65. <b>Address:</b>
  66. <input type="text" name="address" size="50" maxlength="50" value="<?php if (isset($_POST['address'])) echo $address; ?>" />
  67. </p>
  68.  
  69. <p>
  70. <b>Contact Number:</b>
  71. <input type="text" name="contactno" size="15" maxlength="8" value="<?php if (isset($_POST['contactno'])) echo $contactno; ?>" />
  72. </p>
  73. <p></p>
  74. </fieldset>
  75.  
  76. </p>
  77.  
  78.  
  79. <div align="center">
  80. <input type="submit" name="submit" value="Update!" />
  81. <input type="reset" value="Reset" />
  82.  
  83.  
  84. </div>
  85. </p>
  86. </td>
  87. </tr>
  88. <tr>
  89. <td style="width: 100%; height: 10%;">
  90. Copyright 2008 by The KAG Group.&nbsp; All rights reserved.</td>
  91. </tr>
  92. </table>
  93. </form>
  94.  
  95. </body>
  96. </html>
Last edited by peter_budo; Dec 8th, 2008 at 7:12 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 141
Reputation: robothy is an unknown quantity at this point 
Solved Threads: 19
robothy robothy is offline Offline
Junior Poster

Re: i nd help in update n delete on php.

 
0
  #2
Dec 8th, 2008
Perhaps you can repost your question in English? Rather than abbreviating every other word...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC