Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1

    Default [HELP] Row in a table (PHP,MySQL)


    Im new to PHP and MySQL, so i really need some help about my system for our Capstone Project..

    Ang akoang system kay online document request for document like certificate, diploma, TOR og uban pa...Unya sa akong admin area ma view nko ang mga ni request in table which is naay status column na pending pa..So every row naa ko'y "process" na button kay if e click siya ma.change ang status na "process" then ako gusto unta once na ma click ang process kato ra na row ang ma.change na status but sa akong problema ron kay ang tanan man na row ang ma.usab ang status...



    Salamat..

  2. #2
    Create a Table named. tblUsers
    Fields-
    1. Username - PK
    2. Password
    3. Usertype - (Admin, Processor, Claim)

    Process Flow:
    During Login
    Select Case Usertype
    Case Admin:
    add code here .....
    Case Processor:
    add code here ..... (limit ba kaha nimo unsa iyang ma access)
    etc..

  3. #3
    Quote Originally Posted by papasilo View Post
    Create a Table named. tblUsers
    Fields-
    1. Username - PK
    2. Password
    3. Usertype - (Admin, Processor, Claim)

    Process Flow:
    During Login
    Select Case Usertype
    Case Admin:
    add code here .....
    Case Processor:
    add code here ..... (limit ba kaha nimo unsa iyang ma access)
    etc..
    so switch..ako e try, thank you sir.

  4. #4
    Lain na pud na problem mga sir..

  5. #5
    keep trying.

  6. #6
    Quote Originally Posted by emailroy2002 View Post
    keep trying.
    I always do sir, pero i'm running out of time mag butang pako sa template monday na ang defend hehehe..

  7. #7
    post your update command..

    maybe walay

    where id ='$customer_id'


    imong mysql query e post nalang

    ang imong button kailangan mag POST og mag hatag og GET variable ID

  8. #8
    Quote Originally Posted by emailroy2002 View Post
    post your update command..

    maybe walay

    where id ='$customer_id'


    imong mysql query e post nalang

    ang imong button kailangan mag POST og mag hatag og GET variable ID
    <?php
    $host = "localhost";
    $user = "root";
    $pass = "";
    $database = "registrar";

    mysql_connect("$host","$user","$pass") or die ("could not connect to mysql");
    mysql_select_db("$database") or die ("no database");

    $query1 = "SELECT applicant.applicant_no, request.request_id, claims.claim_id FROM applicant,request INNER JOIN claims WHERE claims.claim_id=applicant.applicant_no AND claims.claim_id=request.request_id LIMIT 1";
    $result = mysql_query($query1);
    $row = mysql_fetch_assoc($result);

    $query = ("UPDATE claims SET status='pending' WHERE claim_id = '$row'");
    $result2 =mysql_query($query);
    header('location:view_request.php') or die (mysql_error());

    ?>

    mao na ako inig click na sa submit..yes sir naa na'y POST ang submit

    <td><form action="process.php" method="POST"><input name="submit" type="submit" value="Process" style="font-size:13px;width:60px;height:20px;margin:0px;" /></form>
    </td>

    nya mao na ang sa form na submit sir...salamat.

  9. #9
    Quote Originally Posted by Torsoman View Post
    <?php
    $host = "localhost";
    $user = "root";
    $pass = "";
    $database = "registrar";

    mysql_connect("$host","$user","$pass") or die ("could not connect to mysql");
    mysql_select_db("$database") or die ("no database");

    $query1 = "SELECT applicant.applicant_no, request.request_id, claims.claim_id FROM applicant,request INNER JOIN claims WHERE claims.claim_id=applicant.applicant_no AND claims.claim_id=request.request_id LIMIT 1";
    $result = mysql_query($query1);
    $row = mysql_fetch_assoc($result);

    $query = ("UPDATE claims SET status='pending' WHERE claim_id = '$row'");
    $result2 =mysql_query($query);
    header('location:view_request.php') or die (mysql_error());

    ?>

    mao na ako inig click na sa submit..yes sir naa na'y POST ang submit

    <td><form action="process.php" method="POST"><input name="submit" type="submit" value="Process" style="font-size:13px;width:60px;height:20px;margin:0px;" /></form>
    </td>

    nya mao na ang sa form na submit sir...salamat.

    ingon ani ang gawas sa imung MySQL query?



    based sa imung codes, wala lagi ko'y nakit.an nga table..

    Sa process nimo nga button, dapat naka point ka sa applicant ID mao na ang imung ipasa nga value padung sa imung process.php and para mao ra na ang i-update sa SQL.

  10. #10
    Quote Originally Posted by stealthghost View Post
    ingon ani ang gawas sa imung MySQL query?



    based sa imung codes, wala lagi ko'y nakit.an nga table..

    Sa process nimo nga button, dapat naka point ka sa applicant ID mao na ang imung ipasa nga value padung sa imung process.php and para mao ra na ang i-update sa SQL.

    dli sir..kanang picture kay mao na select na nko sa lahi2 na table..using this code para ma view ->$sql = mysql_query("SELECT applicant.applicant_no, applicant.student_id, applicant.f_name, applicant.l_name, applicant.course, applicant.permanent_address, applicant.contact_no, doctype.doc_name, request.date_requested, claims.status FROM applicant,doctype,request INNER JOIN claims WHERE applicant.applicant_no=request.request_id AND request.doc_id=doctype.doc_id AND claims.claim_id=applicant.applicant_no AND status='Process' ORDER BY applicant_no");

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. need help. Apache, PHP, MySQL Installation.
    By X in forum Windows Software
    Replies: 1
    Last Post: 04-04-2013, 09:40 PM
  2. Display and store image in php/mysql.. HELP!
    By cutterpillow20 in forum Programming
    Replies: 18
    Last Post: 03-12-2013, 08:52 AM
  3. Need PHP help: nested MySQL table
    By bakakon in forum Programming
    Replies: 4
    Last Post: 02-09-2013, 12:31 AM
  4. Replies: 2
    Last Post: 11-06-2006, 01:29 PM
  5. Where: Cebu based PHP/MySQL based hosting
    By cmontoya in forum Websites & Multimedia
    Replies: 19
    Last Post: 06-29-2005, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top