Jump to content

dishadcruze

Members
  • Content Count

    54
  • Joined

  • Last visited

Everything posted by dishadcruze

  1. I want to use php-long polling in my php script to get the instant display of data when admin changes anything from backend. I have browsed for solutions, But could not find any. I have downloaded php-long-polling- master from github. There , i have a file server.php. There the code is like this // PHP caches file data, like requesting the size of a file, by default. clearstatcache() clears that cache clearstatcache(); // get timestamp of when file has been changed the last time $last_change_in_data_file = filemtime($data_source_file); // if no timestamp delivered via aj
  2. I want to convert my dropdown to ajax auto search. Here is my dropdown, when i select any company name it displays other 2 dropdowns by taking the id. <select name="company" class="form-control" onChange="showSubcat(this);" required> <option value="">Select Company</option> <?php $s1 = mysqli_query($con, "select * from company") or die (mysqli_error($con)); while($s2 = mysqli_fetch_array($s1)) { ?> <option value="<?php echo $s2['id']; ?>"><?php echo $s2['company']; ?></option> <?php } ?> </select&
  3. @requinix : Can you please explain more? sorry, i did not get
  4. While adding line items in invoice, i am trying to give product description in ckeditor editable form. But the editor is showing only for 1st product. Here is the code <table class="table table-bordered"> <tr> <th><input class='check_all' type='checkbox' onclick="select_all()"/></th> <th>Name</th> <th>Description</th> <!-- Other heading like qty,tax...etc --> </tr> <tr> <td><input type='checkbox' class='case'/></td> <td><input type="text" class="form-control" id="productname_1" name="pr
  5. i am checking whether the logged in user has access to the page he is trying to view through a script. I have a table pages where i store page ids with links like this and in a table access_level i store user's access now if a user clicks on delete button echo "<td><a onClick=\"javascript: return confirm('Please confirm deletion');\" href='delete_lead.php?id=".$row['LID']."'><div class='label label-danger'><i class='fa fa-trash' title='Delete'></i></div></a></td> "; he should not be able to delete but he should be redirected to no_acces
  6. these are the plugin i have included <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="js/jquery-ui.min.js"></script> 1st one i have included in fiddle, 2nd one i am not able to include there so here i am pasting (jquery-ui.min.js) /*! jQuery UI - v1.11.2 - 2014-12-09 * http://jqueryui.com * Includes: core.js, widget.js, position.js, autocomplete.js, menu.js * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ (function(e){"function"==typeof define&&define.amd
  7. Oh! can you please guide me how to solve it? I feel problem is with function ttotal1() { var ttt = 0; var ty1 = tr.find('.total').val(); var ty2 = tr.find('.ttotal').val(); ttt = ty1+ty2; ttt = Number((ttt).toFixed(2)); $('.ttotal1').html(ttt); } alert(ttt) is not giving any values and calling this function is what i am not doing right, tr.find('.ttotal').val(amt); ttotal1(); .val(amt) is confusing me
  8. Yes . This is the one https://jsfiddle.net/cwmoo4hm/6/ , Where i have updated my code. I checked it and it is there
  9. Here is the fiddle https://jsfiddle.net/cwmoo4hm/ <th style="text-align:center;" class="ttotal1" id="ttotal1"></th> In this column i want to get the total of <th style="text-align:center;" class="total" id="total"></th> <th style="text-align:center;" class="ttotal" id="ttotal"></th> These two. which i am trying to do in function ttotal1() { var ttt = 0; var ty1 = tr.find('.total').val(); var ty2 = tr.find('.ttotal').val(); ttt = ty1+ty2; ttt = Number((ttt).toFixed(2)); $('.ttotal1').html(ttt); }
  10. This is related to https://forums.phpfreaks.com/topic/303946-auto-calculation-not-happening-for-dynamic-rows/ I have added few other columns to have detailed calculations. While editing my calculations are not happening. Here it is Javascript $(".delete").on('click', function() { $('.case:checkbox:checked').parents("tr").remove(); $('.check_all').prop("checked", false); check(); }); var i = $('table tr').length - 1; $(".addmore").on('click', function() { count = $('table tr').length - 1; var data = "<tr><td><input type='checkbox' class='
  11. @benanamen So for each section (Lead, Customer..) I should have bt values in 2's multiples? Thanks lot. I will try now. Please help me if i face any issues in the coding.
  12. I have created a script for access level. where i give access on user basis for each page. i have a table page with links and page name and i have table access_level to store page ids with user id who has the access to which page Here are the tables Giving access like this , permissions.php <ul id="demo2" class="mnav"> <li><a href="#">Sales</a> <ul> <li><a href="#">Lead</a> <ul><table align="center" width="900px;"> <?php $s1 = mysqli_query($con, "SELECT * FROM p
  13. Sorry, i work for an organization there it wont allow me to post the complete application.
  14. CREATE TABLE IF NOT EXISTS `pur_orders` ( `order_id` int(100) NOT NULL AUTO_INCREMENT, `pur_order_id` varchar(12) NOT NULL, `vendor_id` int(100) NOT NULL, `contact_person` varchar(20) NOT NULL, `reference` varchar(255) NOT NULL, `t_c` char(200) NOT NULL, `payment` varchar(100) NOT NULL, `validity` int(10) NOT NULL, `date_created` date NOT NULL, `last_modified` date NOT NULL, `authorise` varchar(15) NOT NULL, `status` varchar(10) NOT NULL, `user_id` int(20) NOT NULL, PRIMARY KEY (`order_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; -- -- Dumping da
  15. I am trying to update the status if all the rows value is set to same value. my query like this $ord = "SELECT * FROM plitems WHERE pur_order_id='".$order_id."'"; $ord1 = mysqli_query($con, $ord); while($ord2 = mysqli_fetch_array($ord1)) { if(($ord2['invoice_status']=='Invoiced')) { $m5 = mysqli_query($con, "UPDATE pur_orders SET status='Invoiced' WHERE pur_order_id='".$order_id."'"); } else { $m5 = mysqli_query($con, "UPDATE pur_orders SET status='Partial' WHERE pur_order_id='".$order_id."'"); } But here i have 2 line items in plitems table, 1st line item status is Invoiced and 2nd
  16. @Jacques1: Sir, i have stored my data with foreign key and primary key constraints in mysql . But i just shared the schematic which i have designed in excel. Instead of using one more table called team_members, i thought of using a table teams and users. In teams table my muid coulmn will be the manager , and under that what all the users stored are the team members. Can i do that way? or u suggest me to have 3 tables?
  17. Hi, I have two tables users and teams users teams And i want to join them and display result like this But not getting how to add same field twice
  18. @DulongC : Thanks a ton for your patience in understanding and resolving my problem step by step. Thank you very much.
  19. @ DulongC : if i do <?php $s1 = mysqli_query($con, "select * from taxes"); $options = ''; while($s2 = mysqli_fetch_array($s1)) { $options .= "<option value='" . $s2['rate'] . "'>" . $s2['name'] . "</option>"; } ?> I get blank values in the 1st row i mean here also But if i do like this <?php $s1 = mysqli_query($con, "select * from taxes"); $options .= ''; while($s2 = mysqli_fetch_array($s1)) { $options = "<option value='". $s2['rate'] . "'>" .$s2['name'] . "</option>"; echo $options; } ?&g
  20. No, not working!. Actually, <?php $s1 = mysqli_query($con, "select * from taxes"); $options = ''; while($s2 = mysqli_fetch_array($s1)) { $options .= "<option value='" . $s2['rate'] . "'>" .$s2['name'] . "</option>"; } ?> this itself is not displaying any dropdown values. Do i need to put echo?
  21. @DulongC : Thanks for the reply. But the value is not passing properly to the script. As i am naive in jquery and scripts, i cant make out how what exactly to be done. Here is what i am getting when i do inspect element
  22. Hi, This is the extending thread of https://forums.phpfreaks.com/topic/303946-auto-calculation-not-happening-for-dynamic-rows/. I want to add dropdown for tax , instead of textbox. Here is my code (php, html) <td><select name="tax[]" class="form-control tax" id="tax_1"> <option value="">Select Tax</option> <?php $s1 = mysqli_query($con, "select * from taxes"); while($s2 = mysqli_fetch_array($s1)) { ?> <option value="<?php echo $s2['rate']; ?>">
×
×
  • 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.