Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


cyberRobot last won the day on September 19

cyberRobot had the most liked content!


About cyberRobot

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

89,327 profile views

cyberRobot's Achievements

Prolific Member

Prolific Member (5/5)




Community Answers

  1. In case you're interested, and you're using HTML5, the <details> tag works like an accordion box...and doesn't require JavaScript. More information (including examples and browser support info) can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
  2. The following w3school page talks about collapsing a website navigation for smaller/mobile screens: https://www.w3schools.com/howto/howto_js_mobile_navbar.asp
  3. Note that rule #5 also mentions that advertising isn't allowed. I'm guessing Barand was hinting at posts like this crossing that line. Of course, limited leeway is given in certain aspects of the forum.
  4. Welcome DigitalDev and good luck with your new career path!
  5. The classes seem to work when I paste them into the w3schools.com demo here: https://www.w3schools.com/w3css/tryit.asp?filename=tryw3css_cards_photo Are you familiar with using your browser's console to analyze the CSS rules being applied to an element on a page? If so, have you tried right-clicking the element that you expect to be centered and seeing what styles are applied to that element? That might provide a clue as to why it's not centered.
  6. Have you tried outputting $holiday_remain_time, to make sure it contains the expected values for "total_year_holiday_hours_complete" and "total_year_holiday_hours"? If not, try adding the following after the variable is defined: print '<pre>' . print_r($holiday_remain_time, true) . '</pre>';
  7. Like ginerjm, I'm not sure I understand the issue / question. However, looking through the code and screenshots, I see that the href attribute in your anchor tag is missing a quote. Perhaps changing this echo ' <a href="kitab= ' . $a["id"] . '>'; to this echo ' <a href="kitab= ' . $a["id"] . '">'; will fix the issue. Note the double quote (") before the greater than symbol (>) at the end.
  8. It sounds like you are trying to access your scripts from different levels of your website hierarchy. For example, you want to access the nav.php script from your main root folder, as well as for the pages under the "models" and "john" folders. Is that correct? If that's the case, I would modify those include statements so that they are root relative. <?php include "{$_SERVER['DOCUMENT_ROOT']}/include/nav.php" ?>
  9. In other words, do you want the gray box to grow/shrink based on the amount of text available? If so, remove "height" from both blocks. Then to prevent the gray box from being smaller than the image boxes, you could use "min-height" instead.
  10. Quick question: how did you make them optional fields? Is there something in the plugin interface that lets you choose whether a field is optional or required? If so, you may need to contact the plugin developer to see what's happening. However, if you're using custom code to handle what happens with required/optional fields, you'll need to do some debugging as the others have suggested.
  11. I should also mention that you'll want to exercise caution when using anything provided by the user in the name of the file (e.g. doctor's name). That information could be used for filesystem attacks. https://www.php.net/manual/en/security.filesystem.php
  12. It's been a while since I've dealt with file uploads. However, you should be able to use whatever file name you want in the second argument for move_uploaded_file(). For example, $pro is currently set to use the original file name provided by the user. Instead, you could move that definition before the call to move_uploaded_file(). Then set $pro to the doctor's name and the insert ID from the query. More information about getting the insert ID can be found here: https://www.php.net/manual/en/mysqli.insert-id.php In case you're not aware, move_uploaded_file() will overwrite files that already exist in the destination folders. More information about the function can be found here: https://www.php.net/manual/en/function.move-uploaded-file.php To potentially avoid this issue, you can use the following: https://www.php.net/manual/en/function.file-exists.php Also, if you haven't already, you'll want to look into prepared queries. That way you don't need to worry about your query above breaking when someone with a last name like O'Brien completes the form. Prepared queries will also protect your database from SQL Injection attacks. More information can be found here: https://www.php.net/manual/en/mysqli.quickstart.prepared-statements.php
  13. No we're saying the same thing. The OP doesn't need all the entries. EDIT: I modified my post to hopefully make that clearer.
  14. First, I should mention I'm with the others. You shouldn't need to pull all the customer IDs from the database. Just run the prepare query to see if the ID is valid. If it is, display the edit form...else display (or redirect them to) the error message. Going that route should fix the issue you are currently having. With that said...the issue you are currently experiencing is likely caused by the following line returning a value that you are not expecting. $members = $statement->fetchAll(); If you try adding the following after the above line print '<pre>' . print_r($members, true) . '</pre>'; You'll likely see output like the following: Array ( [0] => Array ( [customer_id] => 1 [0] => 1 ) [1] => Array ( [customer_id] => 2 [0] => 2 ) ... ) Note that the first array index is "0". Then the following line compares the user's ID against the array indices...not the customer IDs. $valid = array_key_exists($id, $members);
  • 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.