-
Posts
3,145 -
Joined
-
Last visited
-
Days Won
37
Everything posted by cyberRobot
-
For what it's worth, Google also isn't the only search engine that ignores the keywords meta tag when it comes to ranking. Unfortunately, there's too many people willing to pack those meta tags with irrelevant content in order to boost their rankings. Do you consider the description meta tag as part of the "usual list"? The meta tag can be useful for pages that don't have a description paragraph for search engines to display in their results listing.
-
Functions with same name without code duplication
cyberRobot replied to john_zakaria_s's topic in PHP Coding Help
The solution will of course depend on what you are trying to accomplish. If the bulk of the code in the function is the same for both jobs, you might be able to keep that code in a single function. Then build another function(s) to handle the unique parts of each job type. If you need further assistance, we'll likely need to see the function code for each job. -
The JavaScript code is likely running before the DOM is loaded. The following page provides more information (and examples) for detecting when the DOM is loaded: https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event As requinix mentioned, the browser's developer console is a good place to see if there are errors. Note that you'll need to temporarily remove (or comment out) the following line from your code to use the console: document.addEventListener('contextmenu', event => event.preventDefault());
-
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
-
The following w3school page talks about collapsing a website navigation for smaller/mobile screens: https://www.w3schools.com/howto/howto_js_mobile_navbar.asp
-
Hey Community From Scotland & North Northumberland
cyberRobot replied to DigitalDev's topic in Introductions
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. -
Hey Community From Scotland & North Northumberland
cyberRobot replied to DigitalDev's topic in Introductions
Welcome DigitalDev and good luck with your new career path! -
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.
-
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>';
-
Php not reading text input See more: PHP Expand â–¼
cyberRobot replied to egemen's topic in PHP Coding Help
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. -
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" ?>
-
Image, wrapping text around it and auto hight on div.
cyberRobot replied to LeonLatex's topic in CSS Help
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. -
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.
-
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
-
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.
-
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);
-
Perhaps transform: rotate() will do what you need. More information can be found here: https://css-tricks.com/almanac/properties/t/transform/#aa-rotate
-
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.
-
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.
-
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
-
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.
-
More information can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/translate
-
I forgot to mention that you'll need to comment out your redirect when checking the return value from mail(). //header('Location: thank-you');