Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


cyberRobot last won the day on November 1

cyberRobot had the most liked content!

Community Reputation

109 Excellent

About cyberRobot

  • Rank
    Much to Learn

Contact Methods

  • Website URL

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

83,914 profile views
  1. cyberRobot

    How to use while loop inside a concatenation?

    You could assign the event names to an array, for example: $name = array(); while ($row_events = $sth_events->fetch(PDO::FETCH_ASSOC)) { $name[] = $row_events['name']; } Then you could use implode() to output the array. Note that I streamlined the following code a bit: $week .= '<td><div class="'; $week .= ($today == $date) ? 'today' : 'day'; $week .= '">' . $day . '</div>' . implode('<br>', $name) . '</td>'; With that said, it would be better to rewrite the script, as requinix is suggesting, so that you're not running queries inside of loops.
  2. cyberRobot

    Not working and it should

    Your code works for me when I import the jQuery library. Basically, I added the following line above your <script> tag: <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> For some reason, I also needed to change the following: $(window).load(function() { To this $(document).ready(function() { The popup seems to open and close now.
  3. cyberRobot

    Not working and it should

    By the way, I didn't see anything in the code above. Does your real code import the necessary code so that you can use jQuery? If not, your browser's developer console probably says something like "Uncaught ReferenceError: $ is not defined". Note that you can import the library from Google (https://developers.google.com/speed/libraries/).
  4. cyberRobot

    Not working and it should

    I'm guessing you mean Firefox, which is a Mozilla-based browser. Assuming that's correct, have you used Firefox's Web Console before? More information about accessing the console can be found here: https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console In the console, are you getting any JavaScript errors?
  5. cyberRobot

    Not working and it should

    What browser do you use? Are you familiar with using your browser's developer console? If so, are you getting a JavaScript error?
  6. cyberRobot

    SQL injection Hysteria? Or not?

    Just to clarify benanamen's post, the mysql_* functions were removed from PHP 7. The code example you posted contains a call to mysql_query(), which no longer works in PHP 7 or later. Perhaps you're already aware of the change since you also mentioned that you're experimenting with MySQLi. Well, if you weren't aware, you are now. 😊
  7. cyberRobot

    SQL injection Hysteria? Or not?

    For what it's worth, PHP has a built in filter for checking email addresses. More information can be found here: http://php.net/manual/en/filter.examples.validation.php Instead of changing the value of the user response, you could display an error message when you detect something that shouldn't be there. If the user fills out an online form and forgets to include the @ symbol in their email address, for example, you could re-display the form with an error message about the email being incorrect. The user would then be given the chance to fix their mistake.
  8. What is the exact error message you are seeing? It might help if you post the actual code block you're working with.
  9. cyberRobot

    New member Introduction

  10. cyberRobot

    Hiya Everyone!

    Hello 😊
  11. You'll want to review the syntax for heredoc. Hint: it doesn't use greater than. Here's an example from the manual: http://php.net/manual/en/language.types.string.php#example-46
  12. cyberRobot

    New member Introduction

    Welcome! Note that I moved your post to a new thread. Please don't hijack other people's threads. 😊
  13. cyberRobot

    preg_match in statement

    You could use a case-insensitive match. The first example in the PHP manual shows you how. http://php.net/manual/en/function.preg-match.php
  14. Here's a quick tutorial on the "#" technique mentioned by Barand: https://www.lifewire.com/adding-internal-links-3466484
  15. cyberRobot

    fetch_assoc Select Option value filter column

    Since you are no longer attempting to pass the email address through the online form, which is good, the $_POST['userEmail'] will always be blank. Instead, the email address comes from your database. Try changing this $userEmail = $row["email"]; to this $to = $row["email"]; Note that you will also need to remove the following line: $to = $_POST['userEmail'];

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.