Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Ronel

  1. How do i update proposals with date and time when someone approves/complete/rejects the proposal? Screen123 is my database's image. Do i have to add a new column in it for date and time separately? Down below screen12 is my dashboard image, in here i would like to add and show the time and date of the proposal after it gets approved/rejects/completed? 1. This code here shows the approval index. <body> <?php session_start(); //Checking User Logged or Not if(empty($_SESSION['user'])){ header('location:index.php'); } ?> <?php mysqli_report(MYSQLI_REPORT_ERROR|MYS
  2. Dear Sir/Madame I am trying to insert comments into a table called comments using echo ID in the input form but so far i can insert the comments with the post id but unable re-comment again kindly help me what do i do? This is the input form: <div> <form action="ehscomment.php" method="post"> <input type="hidden" name="id" value="<?php echo $id ?>"> <div> <label>Add comment</label> <div> <textarea rows="6" cols="110" name="comment" placeholder="comment"></textarea>
  3. Ronel

    php insert

    okay sir now after i have properly name the input file in the form field and it works good thank you so much.
  4. Ronel

    php insert

    <?php session_start(); if (!isset($_SESSION['username'])) { $_SESSION['msg'] = "You have to log in first"; header('location: login.php'); } if (isset($_GET['logout'])) { session_destroy(); unset($_SESSION['username']); header("location: login.php"); } ?> <?php $host="localhost"; $username="root"; $pass=""; $db="registration"; $conn=mysqli_connect($host,$username,$pass,$db); if(!$conn){ die("Database connection error"); } // insert query for register page if(isset($_POST['ronel'])){ $image = $_FILES['file']['name']; $target_dir = "uploads/"; $target_fil
  5. Ronel

    php insert

    no sir the line is 40 not line 57 because i haven't posted the codes from the top. Sorry. The exact line is $name=$_POST['name']; and i cannot seem to find the error!! kindly help.
  6. Not being able to upload images in the directory with a path name in the database? 1) This is my code for insert into the database and directory: <?php $host="localhost"; $username="root"; $pass=""; $db="registration"; $conn=mysqli_connect($host,$username,$pass,$db); if(!$conn){ die("Database connection error"); } // insert query for register page if(isset($_POST['ronel'])){ $images = $_FILES['file']['name']; $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["file"]["name"]); // Select file type $imageFileType = strtolower(pathinfo($target
  7. Ronel

    PHP update

    Warning: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables in /opt/lampp/htdocs/new1/ronel_detail.php on line 15 Fatal error: Uncaught mysqli_sql_exception: No data supplied for parameters in prepared statement in /opt/lampp/htdocs/new1/ronel_detail.php:16 Stack trace: #0 /opt/lampp/htdocs/new1/ronel_detail.php(16): mysqli_stmt->execute() #1 {main} thrown in /opt/lampp/htdocs/new1/ronel_detail.php on line 16 This is the error it gave me!
  8. <?php mysqli_report(MYSQLI_REPORT_ERROR|MYSQLI_REPORT_STRICT); $conn = mysqli_connect("localhost","root", "","update"); // // PROCESS POSTED DATA // if ($_SERVER['REQUEST_METHOD']=='POST') { $stmt = $conn->prepare("UPDATE ronel SET status = ?, comment = ?, department = ? WHERE id = ? "); $stmt->bind_param('ssi', $_POST['status'], $_POST['comment'], $_POST['departmen
  9. Sir it says= <?php $conn = mysqli_connect("localhost","root", "","update"); // // Check if data was posted for processing // if ($_SERVER['REQUEST_METHOD']=='POST') { $stmt = $conn->prepare("UPDATE ronel SET status = ? WHERE id = ? "); $stmt->bind_param('si', $_POST['status'], $_POST['id']); $stmt->execute(); header("Location: #"); // reload the page
  10. Thanks a lot. Sir it is working now but one more trouble sir and that is i need to put a comment text box with the approve and reject button!!
  11. Sir lets say i don't want to show the details,date and time, in the dashboard only status,id,location and comment with a click button on its side to view the full details. Now, when i click the full details button it href me to another page and shows me the full details? How do i that here with the same code or do i need to change anything in order to achieve it??
  12. Sir what if i want to display the data from the database with a link and when i click on the link shows the whole database on the other page? The whole status comment and details all? can it be possible? please help me out with this ! <body> <h2 style="text-align:center; color:orangered;"> DASHBOARD </h2> <table> <h3> <tr style="background-color:#E4EBC5; color:orangered;"> <th>ID</th> <th>Details</th> <th>Location</th>
  13. great help from you thank you a ton sir you made my day awesome i have been trying these for days!! i cannot thank you enough .
  14. Sir this is my dbconfig.php <?php $connection = mysqli_connect("localhost","root", "","update"); ?>
  15. Sir this has come!! I cannot seem to fine the solution 😕 <?php require "dbconfig.php"; // // Check if data was posted for processing // if ($_SERVER['REQUEST_METHOD']=='POST') { $stmt = $conn->prepare("UPDATE ronel SET status = ? WHERE id = ? "); $stmt->bind_param('si', $_POST['status'], $_POST['id']); $stmt->execute(); header("Location: #"); // reload the page
  16. sir can you please show me how to apply on the code? I am very much new to this
  17. Dear Sir/Madame I am making a website where user can insert data and wait for the admin to approve/reject the form. Now i am stuck with the update status where an admin can submit with a click pending to approval or reject with comments. I am new to PHP programming. Can somebody help me with the issue. Part 1 is inserting the data and part two is fetching the data but i am unable to solve the status approve/reject and comment at the same time on the view.php? page. Kindly help. Thank you. <?php $host="localhost"; $username="root"; $pass=""; $db="ems1"; $conn=mysqli_connect($hos
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.