Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Naveed786

  • Rank

Recent Profile Visitors

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

  1. Yup you are right let me give it a try also. Thanks for the recommendations.
  2. Thanks @requinix You always encourage me to learn when i was reading some articles i found the better way to achieve this is javascript. I use the java script to achieve the result onmousemove event below is the code. <script type="text/javascript"> function EnableDisable(entt) { var btnsubmit = document.getElementById("btnsubmit"); if (entt.value.trim() != "OUT") { btnsubmit.disabled = false; entt.disabled = false; } else { btnsubmit.disabled = true; entt.disabled = true;
  3. Thanks for the guidance and help I will give it a try and will update back. Cheers.
  4. I am beginner and on learning stage, your question is right i understand. I know the method i wrote is wrong most probably.
  5. Thanks for the guidance here is the code: <?php if($gst="OUT"){ <input name="noopaxs" id="noopaxs" readonly = "" value="<?php echo $row['noopaxs'];?>"> else{ <input name="noopaxs" id="noopaxs" value="<?php echo $row['noopaxs'];?>"> }} ?> and the error is: Parse error: syntax error, unexpected '<' Thanks for the help.
  6. Yes please i know how to mark the textbox readonly or disabled. <input name="entby" id="entby" rows="9" class="form-control" required="" readonly="" value="<?php echo $entby; ?>"> if i will put disable instead of readonly it will be disabled. I read in in one article if we use readonly the value will be updated in the database if we update a record but if it's disabled the value will not be updated. Cheers.
  7. Hi requinix, Sorry for late reply, I already tried above method, i was thinking might be there is some way to only edit the select record, i am using the method to show more fields to identify the record and update it, can u please help me with below code, i want to disable the update button in case if the record date is in past. Can anyone help me with example, like <?php If($gst='OUT'){ disable textbox1 and textbox2 } >? I saw several examples but not able to understand properly, if conditions true then text boxes will
  8. Hi Everyone, Any help will be highly appreciated. Still trying to find solution for this. Thanks in advance. Cheers.
  9. Hi mac_gyver, Thanks for pointing it out, i did some study on this and changed the code now it's retrieving the correct count but now am getting one box for each noofpaxs count but i only want only one perticular count for the record which i need to edit, please see below code and screen shot. <?php $cnfno=$_GET['confno']; $query1=mysqli_query($con,"SELECT SUM(noopaxs) AS gattl FROM tblsupvisitor where date(EnterDate) = CURDATE() AND (gst = 'INH' AND entt = 'IN') || (confno='$cnfno') GROUP BY confno"); while ($row=mysqli_fetch_array($query1)) { ?> Please help me
  10. Hi, Still waiting if someone can help me on this please.
  11. It's producing the result in mysql properly no issues once i am using in php it's not bringing any reult but now i modified the query it brings the result but it's not calculating total properly for example with confno there are 3 records and each has i noopaxs it should bring 3 but it's bringing back 2 as a sum and also it's happening for each group of confno, please see below code. <?php $eid=$_GET['editid']; $query2=mysqli_query($con,"SELECT SUM(noopaxs) as gattl FROM tblsupvisitor where date(EnterDate) = CURDATE() || gst = 'INH' || entt = 'IN' || ID='$eid' GROUP BY confno");
  12. Hi kicken, I have tried this but still the text box is blank no value it's empty. Below is code with advised changes. <?php //Calculation for no of paxs. $query2=mysqli_query($con,"SELECT SUM(noopaxs-gattl) AS gattl FROM tblsupvisitor where date(EnterDate) = CURDATE() || gst = 'INH' || gst = 'IN' GROUP BY confno"); $calc_no_paxs_for_today=mysqli_fetch_row($query2); $gattl=$calc_no_paxs_for_today['gattl']; ?>
  13. Dear All, I am trying to fetch the sum of a column for current date and subtract a value from the sum for currently selected record. The query i build works fine in MySql but when the same query i placed in php no result it's blank. Below is the query. <?php //Calculation for no of paxs. $query2=mysqli_query($con,"SELECT SUM(noopaxs-gattl) FROM tblsupvisitor where date(EnterDate) = CURDATE() || gst = 'INH' || gst = 'IN' GROUP BY confno"); $calc_no_paxs_for_today=mysqli_fetch_row($query2); $gattl=$calc_no_paxs_for_today['gattl']; ?> and her is the assignment
  14. Hi, Anyone can help on above query please.....
  15. Thanks to all for help and guidance, it's working fine now the issue was with Java script @requinix thanks for the guidance it's always fantastic and great. One quick question i want to put some formatting in the file as currently it looks very simple and still first column serial number is getting hidden i can not see the number under it but when i export the data is there. Can any one help on this code is already posted above. Thanks in advance. Naveed.
  • 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.