Jump to content

Ivan007

New Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Ivan007's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. object(PDOStatement)#6 (1) { ["queryString"]=> string(1422) "SELECT tblseeker.First_Name,tblseeker.Last_Name, tblseeker.Phone_No,tblseeker.Tel_No,Email,Address, tblqualification.Qualification_type,tbllocation.District,Job_Preference, tbljobcategory.Category,tblcontracttype.Contract_type,Seeker_pic,status_id from tblseeker INNER JOIN tblqualification on tblseeker.qualification_id=tblqualification.Qualifi_id INNER join tbllocation on tblseeker.State=tbllocation.Location_ID INNER JOIN tbljobcategory on tblseeker.category_id= tbljobcategory.category_id INNER JOIN tblcontracttype on tblseeker.contract_id =tblcontracttype.contract_id where tblseeker.First_Name='ivan' or tblseeker.Last_Name='' or tblseeker.Phone_No='' or tblseeker.Tel_No=''or tblqualification.Qualification_type='Choose...' or tbllocation.District='Choose...' or tbljobcategory.Category='Choose...' or tblcontracttype.Contract_type='Choose...';" } I got this value when using var_dump($stmt)
  2. when I var_dump($stmt) I got the right result but nothing is output at this stage while($rows = $stmt->fetch(PDO::FETCH_ASSOC)){ //at this point nothing is output echo ("<tr>"); echo "<td>". htmlentities($rows['First_Name']) ."</td>"; echo "<td>". htmlentities($rows['Last_Name']) ."</td>"; echo "<td>". htmlentities($rows['Phone_No']) ."</td>"; echo "<td>". htmlentities($rows['Tel_No']) ."</td>"; echo "<td>". htmlentities($rows['Email']) ."</td>"; echo "<td>". htmlentities($rows['Address']) ."</td>"; echo "<td>". htmlentities($rows['District']) ."</td>"; echo "<td>". htmlentities($rows['Job_Preference']) ."</td>"; echo "<td>". htmlentities($rows['Qualification_type']) ."</td>"; echo "<td>". htmlentities($rows['Category']) ."</td>"; echo "<td>". htmlentities($rows['Contract_type']) ."</td>";
  3. $stmt = $pdo->query("SELECT tblseeker.First_Name,tblseeker.Last_Name, tblseeker.Phone_No,tblseeker.Tel_No,Email,Address, tblqualification.Qualification_type,tbllocation.District,Job_Preference, tbljobcategory.Category,tblcontracttype.Contract_type,Seeker_pic,status_id from tblseeker INNER JOIN tblqualification on tblseeker.qualification_id=tblqualification.Qualifi_id INNER join tbllocation on tblseeker.State=tbllocation.Location_ID INNER JOIN tbljobcategory on tblseeker.category_id= tbljobcategory.category_id INNER JOIN tblcontracttype on tblseeker.contract_id =tblcontracttype.contract_id where tblseeker.First_Name='$txtfname' or tblseeker.Last_Name='$txtlname' or tblseeker.Phone_No='$txtpnum' or tblseeker.Tel_No='$txttel'or tblqualification.Qualification_type='$txtquali' or tbllocation.District='$txtlocation' or tbljobcategory.Category='$txtcategory' or tblcontracttype.Contract_type='$txtcontract';"); //here the data output when I used var dump while($rows = $stmt->fetch(PDO::FETCH_ASSOC)){ //at this point nothing is output echo ("<tr>"); echo "<td>". htmlentities($rows['First_Name']) ."</td>"; echo "<td>". htmlentities($rows['Last_Name']) ."</td>"; echo "<td>". htmlentities($rows['Phone_No']) ."</td>"; echo "<td>". htmlentities($rows['Tel_No']) ."</td>"; echo "<td>". htmlentities($rows['Email']) ."</td>"; echo "<td>". htmlentities($rows['Address']) ."</td>"; echo "<td>". htmlentities($rows['District']) ."</td>"; echo "<td>". htmlentities($rows['Job_Preference']) ."</td>"; echo "<td>". htmlentities($rows['Qualification_type']) ."</td>"; echo "<td>". htmlentities($rows['Category']) ."</td>"; echo "<td>". htmlentities($rows['Contract_type']) ."</td>";
  4. I want to display data in my table tbljobcategory but for example , if the return data is Infomation and Technology it is only returning Infomation... <?php $stmt = $pdo->prepare("select * from tbljobcategory where category_id=:catid"); $stmt -> execute(array(":catid"=>$_GET["catid"])); $rows = $stmt ->fetch(PDO::FETCH_ASSOC); $CategoryName = htmlspecialchars($rows["Category"]); ?> <div class="card text-center form-add" style="width:35%;"> <div class="card-header"> Edit Job Category </div> <div class="card-body"> <form method="post" action=""> <div class="mb-3"> <label for="exampleFormControlInput1" class="form-label">Current Job Category</label> <input class="form-control" type="text" value=<?php echo "$CategoryName " ;?> disabled readonly> </div> <div class="mb-3"> <label for="exampleFormControlTextarea1" class="form-label">New Job Category</label> <input class="form-control" type="text" name="NCategory" placeholder="New Job Category" aria-label="default input example"> </div> <button type="submit" name="btn-update" class="btn btn-primary">Save Changes</button> <button type="submit" name="btn-cancel" class="btn btn-secondary">Cancel</button> </div> </form>
  5. <?php //It's a simple program to valid age but it only print 'you can vote' despite any value I input. $age=(isset($_POST['age'])); if(isset($_POST['age'])){ if($age >=18){ echo "you can vote!!!"; }elseif($age < 18){ echo "You are not allowed to vote"; }else{ echo "enter a valid age"; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <form method="post"> <input type="text" name="age"> <input type="submit"> </form> </body> </html>
×
×
  • 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.