Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


cyberRobot last won the day on March 4

cyberRobot had the most liked content!

Community Reputation

123 Excellent

About cyberRobot

  • Rank
    Much to Learn

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

86,168 profile views
  1. Be default, the display property for <div> tags is set to "block". This means that a line break is added before and after the <div> tag. Since it looks like you are trying to display a series of images with a text block below the photo, you could wrap both the image and the <div> tag with a parent <div> tag. Then using CSS to, you could float that parent div tag to the left. For code examples, you could run a Google search for "css image gallery with captions".
  2. It sounds like something went wrong with the database query that resulted in $tweets / $tweet. Have you tried enabling the error reporter for PDO? More information can be found here: https://www.php.net/manual/en/pdo.error-handling.php
  3. Thanks! I highly doubt I'll use the technique. Text changes too much for me to feel comfortable using this to create links on a website. However, maybe the technique would be useful for pointing out something on a website to a colleague / stakeholder.
  4. I just noticed that the W3C website uses links like the following: https://www.w3.org/TR/UNDERSTANDING-WCAG20/seizure-does-not-violate.html#:~:text="Flashing" refers to content that,users could turn it off. The technique doesn't appear to work with Firefox, but seems fine with both Chrome and Edge. Does anyone know what this technique is called?
  5. PHP is getting confused about the single quotes in the SESSION variable. You could add curly brackets around the variable: $query = "SELECT page_url,link_anchor_text,page_description,keyphrases,keywords FROM links WHERE {$_SESSION['search_column']} = ?"; Or you could utilize string concatenation: $query = "SELECT page_url,link_anchor_text,page_description,keyphrases,keywords FROM links WHERE " . $_SESSION['search_column'] . " = ?"; Note that you want to validate the "search_column" variable. That way you prevent the query from potentially breaking if the column name is a reserved word or if the column name doesn't exist in the database table. You will also want to prevent things like SQL injection attacks.
  6. Yes If the drop down was malfunctioning, there was something else wrong with the code. Perhaps one of the tags was missing or coded incorrectly. All the above "Select here" code does is create a new option in the drop down so that neither "Yes" or "No" is the default selection, which is a good way to make sure the user actually makes a selection. They have to actually to interact with the drop down to answer the question. That depends on the tutorial. Most tutorials don't talk about everything a reader needs to know in order to do something. Otherwise too much time will be spent on trying to explain the basics before they can get to the topic the tutorial was designed for. Or maybe this was beyond the scope of the tutorial. If the tutorial was about creating a simple form, for example, they are not going to go into ever facet of an HTML form. There would be too many things to discuss for a single tutorial.
  7. I haven't run into a situation where I've needed a submit button with both text and an image. But here's what Kicken mentioned earlier: Alternatively, you could make the text part of the image and use <input type="image">, which also submits the form. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/image
  8. You only need to use the "for" attribute if there is something between the form input and the corresponding form label. I avoid using "for" whenever possible because it's cleaner / less code. However, there are cases where I needed to use the "for" attribute. More information about the <label> tag, along with the benefits of using the tag, can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label FYI - the following code is acceptable: <input type="radio" id="male" name="gender" value="male"> <label for="male">Male</label> However, I would actually change it to the following: <label><input type="radio" name="gender" value="male"> Male</label> As Barand mentioned, <label> tags are designed to associate a input field (e.g. input tag, textarea, etc.) with it's corresponding field label. So, in the example provided, the "Male" label needs to be connected with the corresponding radio button. The same goes for the "Female" label. Note: if the <label> tags are set up properly, clicking the label should put focus on the corresponding input field. In the case of radio buttons, clicking the label will select the radio button associated with the clicked label.
  9. The while loop in the above code is missing a closing curly brace.
  10. Are you getting any errors? Is PHP set to output all errors? Perhaps the call to header() isn't being executed. Have you tried outputting something right before the call to header()?
  11. More information about redirecting with PHP can be found here: https://www.php.net/manual/en/function.header.php
  12. The following line looks like JSON. {"code":0, "reason":"OK", "resp":"AT+CCFC=1,3,\" 92061460\"\r\nERROR\r\n"} You could try using PHP's json_decode() function to extract the code, reason, and resp variables. More information, including examples, can be found in the manual. https://www.php.net/manual/en/function.json-decode.php Then you could use explode() to break the "resp" component based off the double quote ("). Then chop off the third value, assuming the lines always look similar to the above. Does the following line come from the API? {"code": 0, "reason": "OK", "resp": "AT + CCFC = 1,3, \" 92061460 \ "\ r \ nOK \ r \ n"} Unless I'm missing something, that's not valid code. Basically, the "resp" portion is equal to "AT + CCFC = 1,3, \" 92061460 \ "\ r \ nOK \ r \ n", which is surrounded by double quotes. In order to use double quotes in the middle of the string, they need to be escaped with a backslash. The first escaped quote is fine. The second one is not since there is a space between the backslash and the quote. The \r and \n entities are also invalid because of the extra spaces.
  13. Also, please use code tags when posting code to the forum. It makes the post much easier to read. One way to add code tags is to click the <> icon in the toolbar above the area where you are writing the post. It's right next to the smiley face.
  14. Is validDate() defined in your script? Note that PHP has a built-in date checker. More information can be found here: https://www.php.net/manual/en/function.checkdate.php If you scroll down to the "User Contributed Notes" section, there is a user-defined function validateDate() that you could experiment with.
  • 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.