Jump to content

cyberRobot

Moderators
  • Posts

    3,086
  • Joined

  • Last visited

  • Days Won

    34

Everything posted by cyberRobot

  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);
  15. Perhaps transform: rotate() will do what you need. More information can be found here: https://css-tricks.com/almanac/properties/t/transform/#aa-rotate
  16. For what it is worth, I see the same thing in Dreamweaver 21.3, which is the most recent version according to my Adobe Creative Cloud app. The "sticky" option is the only "position" type which isn't colored like the other position types. I'm guessing Adobe just needs to correct something on the backend to fix the issue.
  17. Keep in mind that the 775 (pixels) mentioned by Barand is more than just your monitor's resolution. I also have a monitor with 1920x1080 resolution. When my Chrome browser window is maximized, for example, the window width is 1920 pixels. If you happen to have any browser side panels open, the browser width will be less. The other thing that might be causing an issue with the percentage layout breaking is your browser zoom level. When my browser window is maximized (1920px wide) and the zoom level is set to 100%, I see 2 columns when testing your CSS code. However, if I bump that zoom level to 300%, the menu column gets shoved to the bottom of the page.
  18. I'm guessing that you are referring to the following: https://www.w3schools.com/w3css/ If that's the CSS code you are using, note that they provide a couple linking examples on the above page under the "How To" heading. The first example shows how you can link to the stylesheet on the w3schools website. The second example shows how you can store the CSS code in a separate file on your server. Then use the <link> tag to link to that external CSS file. Of course, you will need to customize the href value so that it points to the proper location on your website. As for your question about margins, you could review the following page: https://www.w3schools.com/w3css/w3css_margins.asp ...or you could dig through the CSS file itself: https://www.w3schools.com/w3css/4/w3.css
  19. I'm guessing that's a browser feature. For example, Google Chrome automatically shows an icon to translate a website when you view a page written in a foreign language. More information can be found here: https://support.google.com/chrome/answer/173424 The translate attribute sounds like it can be used to control how these automatic translation services work. For example, you can say that a particular word shouldn't be translated since it is a brand name.
  20. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate
  21. I forgot to mention that you'll need to comment out your redirect when checking the return value from mail(). //header('Location: thank-you');
  22. Note that the mail() function returns true/false to indicate whether the message was accepted for delivery. If you haven't already, you'll want to check what the function is returning. It should be noted, however, that a true value doesn't mean the message was actually delivered. More information about mail() can be found here: https://www.php.net/manual/en/function.mail.php Also, it may help if enable all PHP errors/warnings to be shown. This can be accomplished by adding the code below to your PHP. Be sure to remove the code when you are done with the debugging process. <?php //REPORT ALL PHP ERRORS error_reporting(E_ALL); ini_set('display_errors', 1); ?>
  23. You should be able to temporarily add it anywhere in your PHP code. Note that you're only adding it for "debugging" purposes. It would be removed once you know what the value contains. More information about the function can be found here: https://www.php.net/manual/en/function.ini-get.php
  24. As ginerjm mentioned, you'll want to avoid letting the user supply the From address. Partly because your mail server isn't going to be authorized to send mail on behalf of email services like Gmail, Yahoo, etc. If you're interested in learning more, you could look up Email Spoofing. Side note: PHP has a built-in validator for email addresses. See the first example here: https://www.php.net/manual/en/filter.examples.validation.php
×
×
  • 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.