| | |
i nd help in update n delete on php.
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2008
Posts: 2
Reputation:
Solved Threads: 0
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 :
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 :
php Syntax (Toggle Plain Text)
<html> <head> <title>User Profile</title> </head> <body> <?php //TODO 0: get user's email $email = $_GET['email']; //TODO 1: Connect to kagdbdb database $mysqli = new mysqli("localhost", "root", null, "kagdb"); //TODO 2: Prepare the statement to select user $stmt = $mysqli->prepare("Select password, address, contactno, from user where email=?"); //TODO 3: Bind the values $stmt->bind_param("s", $email); //TODO 4: Execute the statement $stmt->execute(); //TODO 5: bind results into $password, $address ,$contactno and $email $stmt->bind_result($password, $address, $contactno, $email); //TODO 6: fetch the result $stmt->fetch(); //TODO 7: close the statement $stmt->close(); //TODO 8: close $mysqli $mysqli->close(); ?> <form action="userupdate.php" method="post"> <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100px;"> <tr> <td style="width: 100%; height: 20%;"> </td> </tr> <tr> <td style="width: 100%; height: 70%;"> <h2>User Profile</h2> <fieldset> <legend>Edit your profile in the form below:</legend> <!--TODO 9: Fill in the values for each of the input fields so that data is displayed--> <p> <b>Password:</b> <input type="password" name="password" size="15" maxlength="8" value=""/> </p> <p> <b>Address:</b> <input type="text" name="address" size="50" maxlength="50" value="<?php if (isset($_POST['address'])) echo $address; ?>" /> </p> <p> <b>Contact Number:</b> <input type="text" name="contactno" size="15" maxlength="8" value="<?php if (isset($_POST['contactno'])) echo $contactno; ?>" /> </p> <p></p> </fieldset> </p> <div align="center"> <input type="submit" name="submit" value="Update!" /> <input type="reset" value="Reset" /> </div> </p> </td> </tr> <tr> <td style="width: 100%; height: 10%;"> Copyright 2008 by The KAG Group. All rights reserved.</td> </tr> </table> </form> </body> </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.
![]() |
Similar Threads
- PHP help in creating profile thingy (PHP)
- inserting checkbox values in mysql +PHP (PHP)
- Cannot get MySQL to talk to .php file (MySQL)
- Hello all... Need help updating mysql with php (PHP)
- Trying to update entire column in database (PHP)
Other Threads in the PHP Forum
- Previous Thread: php-gtk
- Next Thread: PHP and creating a new system
| Thread Tools | Search this Thread |
# 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date display dissertation dynamic echo echo$_get[x]changingitintovariable... email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link local login loop mail memberships menu mlm multiple multipletables mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space spam sql syntax system table tutorial update upload url validator variable video web xml youtube





