Jump to content
Killersites Forums


  • Posts

  • Joined

  • Last visited

rup2020's Achievements


Newbie (1/14)



  1. Thank you very much !!!!!!! I have solved my problem..
  2. I have create the insert.php file but it not work can nay one solve this matter.... <?php // connect to the database include("user-connect-db.php"); /*------------------------------- EDIT RECORD --------------------------------*/ // if the 'id' variable is set in the URL, we know that we need to edit a record if (isset($_POST['submit'])) { if (isset($_GET['id'])) { // if the form's submit button is clicked, we need to process the form // make sure the 'id' in the URL is valid if (is_numeric($_POST['id'])) { // get variables from the URL/form $id = $_POST['id']; $feedback = htmlentities($_POST['feedback'], ENT_QUOTES); // if everything is fine, update the record in the database if ($stmt = $mysqli->prepare("UPDATE sblnrat SET feedback= ? WHERE id=?")) { $stmt->bind_param("si", $feedback, $id); $stmt->execute(); $stmt->close(); } // show an error message if the query has an error else { echo "ERROR: could not prepare SQL statement."; } // redirect the user once the form is updated header("Location: member-view.php"); } } // if the 'id' variable is not valid, show an error message else { echo "Error...............!!!!!!!"; } } // close the mysqli connection $mysqli->close(); ?>
  3. I am Not good and I am not Bad

  4. Hello! Dear Friend This was an awesome tutorial which I have used to create a database system . There I have a problem ?? Please see attachment!! I want to edit the "feedback" field without leaving the view page. I want to edit on preview table. How can I do that. I have modify your code look like that .... <?php require_once('auth.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Member Index</title> <link href="loginmodule.css" rel="stylesheet" type="text/css" /> </head> <body> <center> <img src="./images/sonali.jpg" height="100px" width="100px"/> </center> <div align="center"> <p> <h1> Welcome TO Sonali Bank Limited</h1><br /> <h2><?php echo $_SESSION['SESS_FIRST_NAME'];?></h2> <h2><?php echo $_SESSION['SESS_LAST_NAME'];?></h2> <h3>BRANCH CODE : <?php echo $_SESSION['SESS_MEMBER_LOGIN'];?></h3> </div> <p><a href="member-profile.php">My Profile</a> | <a href="logout.php">Logout</a> | <a href="user-view-admin.php">View ALL</a> | <a href="user-view-paginated.php">View Paginated</a></p> <?php //This code is for SONALI BANK ONLY // connect to the database include('user-connect-db.php'); include('config.php'); //check user name // get the records from the database if ($result = $mysqli->query("SELECT * FROM sblnrat WHERE brcode = $_SESSION[sESS_MEMBER_LOGIN] Order by id")) { // display records if there are records to display if ($result->num_rows > 0) { // display records in a table echo "<table align='center' border='1' cellpadding='10'>"; // set table headers echo "<tr><th>SL</th><th>PON</th><th>TRA NO.</th><th>TRA DT</th><th>BR-CODE</th><th>BR-NAME</th><th>BF-NAME</th><th>BF-A/C</th><th>AMT</th><th>Feed Back</th></tr>"; while ($row = $result->fetch_object()) { // set up a row for each record echo "<tr>"; echo "<td>" . $row->id . "</td>"; echo "<td>" . $row->pon . "</td>"; echo "<td>" . $row->trano . "</td>"; echo "<td>" . $row->tradt . "</td>"; echo "<td>" . $row->brcode . "</td>"; echo "<td>" . $row->brname . "</td>"; echo "<td>" . $row->bfname . "</td>"; echo "<td>" . $row->bfac . "</td>"; echo "<td>" . $row->amt . "</td>"; echo "<td>" . $row->feedback . "</td>"; echo "<td>".' <form action="insert.php?id='. $row->id . '" method="post"> <select name="feedback"> <option selected="selected">'.$row->feedback.'</option> <option value="Paid">02</option> <option value="NotPaid">05</option> </select> <input type="submit" name="submit" value="Update" /> </form>'."</td>"; echo "<td><a href='user-records.php?id=" . $row->id . "'>Edit</a></td>"; echo "</tr>"; } echo "</table>"; } //if there are no records in the database, display an alert message else { echo "No results to display!"; } } // show an error if there is an issue with the database query else { echo "Error: " . $mysqli->error; } // close database connection $mysqli->close(); ?> <br /> </body> </html> When I want to submit feed back the insert.php was nor working ????? can any one make a insert.php for me or any java script solution or other else!!!
  • Create New...