Jump to content

Cheslia

Members
  • Content Count

    19
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Cheslia

  • Rank
    Member
  1. Wow, I didn't expect such harsh words, like you've never made syntax errors that you just can't see for looking at it for days! Sorry I ever posted here because you guys are generally very helpful.
  2. OMG John that was it. So simple and so odd that that would make a difference, thank you so much!!! So why would the value= cause it to drop the first element in the select options like that?
  3. I have a php program that calls a function in my class to populate a select tag for display in the page. For some reason I cannot seem to discover, it retrieves the information, it correctly creates the option tags, but then when it displays the dropdown dialog box, the very top entry is missing. I sure could use another set of eyes on this to tell me what I'm missing as I know it has to be something simple. Here is the php page code that calls the function: if ($redisp==1) { $table_ex_entries .= "<table><tr>"; for ($x=0; $x<10; $x++) { //get the catego
  4. Yeah I know it was a lot. I tried to make a "mockup" of just the details, but can't seem to skinny it down enough to reproduce the issue. But thanks for the advice. I'll keep digging or trying to find another workaround.
  5. Thanks for all your help. I ended up working around it by calling another php page. Not what I wanted, but it works.
  6. Sorry about that....I maintain code that someone else wrote and it is a different style than I am used to. The field in question is the $category or $_POST['CAT'] field. I guess I left out one important function that actually builds that dropdown box with values. Here is that function that is called by getCatName(). I hope that helps.... public function getCatName($uid, $cat) { $out = ''; $cats = array(); $dbh = $this->rdb; $dbh->query("SELECT Categories FROM Users WHERE ID = :id"); $dbh->bind(':id', $uid); $row = $dbh->single(); $user_cats = (isset($row['Cat
  7. I have a timeclock application where you can add entries into a table. One of the columns is a <select> dropdown tag. If you do not enter one of the required fields, I redisplay the values entered so the user can correct the entries and resubmit to save them. Everything saves (posts) except the <select> dropdown value. The dropdown does show properly, even with the properly selected value. But if you change the value, it doesn't update. It retains the original value. Here is the function from STOP_Timeclock.php class that does the form: public function add_entries_page
  8. Another question....what about putting a <div> that will be hidden until this scenario gets triggered, then unhiding it and displaying radio buttons to select for the user to continue vs. a pop-up dialog box? I've been playing with that a bit but having issues. I already have some ajax/jquery going for hiding/showing/input into the textarea div based on a selection from a menu, but not sure how to incorporate it into the existing ajax....or to have a separate function inside the same <script> tag. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.m
  9. Do you know of samples of this anywhere? I'm still pretty new to PHP and definitely green when it comes to using jquery and ajax.
  10. If possible, I would prefer to leave them on this page and just pop-up a dialog box for them to click on. Is that not possible to do?
  11. I've looked around various forums and found different answers, but nothing seems to fix exactly or work for me. Scenario: User is modifying a database table's text column value that already exists in the table in a <textarea> tag. Upon clicking submit, the validation code does a database query to see where the primary key might be associated with other records that would be affected by this change and returns a list of those affected. The code then evaluates if there is anything returned, and if there are rows returned, creates a list to be presented to the user to let them know
  12. Oops, sorry about not encapsulating the code properly, I see that now and will do in the future. I was aware of not having two elements on the page with the same ID, I was removing/adding them back and forth in testing, but just copied them both in the code snippet. I should have clarified. And your solution $('#inputSectionID').val(result); worked perfectly, thanks! I knew it was probably something simple I was missing. Thanks again!
  13. Edited by Psycho: Please use code tags I have a php program containing this script tag.... <script> $(document).ready(function() { $("#csid").on("click", function () { console.log($("#csid").val()); var cs_id = $("#csid").val(); var schema_name = '<?php echo $schema ?>'; console.log(schema_name); console.log(cs_id); $.ajax({ type: 'Post', url: 'display_custext.php', data: { csid:cs_id,
  14. RESOLVED: Thanks everyone for your assistance! It was in the form action calling the first_page again prior to the redirect to the second_page and when the form was submitted, the get was blank, which makes sense. Here is the solution in case anyone else runs into this issue. I've left some of the debug in place to help others as well as it helped me. index2.php -- <?php session_start(); ?> <!DOCTYPE HTML> <html> <head> <link rel="stylesheet" type="text/css" href="includes/style.css"> </head&
×
×
  • 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.