Jump to content

cyberRobot

Moderators
  • Content Count

    2,835
  • Joined

  • Last visited

  • Days Won

    23

cyberRobot last won the day on November 1 2018

cyberRobot had the most liked content!

Community Reputation

110 Excellent

About cyberRobot

  • Rank
    Much to Learn

Contact Methods

  • Website URL
    http://www.cyberscorpion.com/

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

84,054 profile views
  1. cyberRobot

    JS for radio button TEXT content

    Have you tried outputting this.id? It doesn't contain what you expect. You need to extract the ID from the HTML element. Hint: the following code gives you an HTML element: document.form.group1[i] The properties available through that element are described in the manual here: https://developer.mozilla.org/en-US/docs/Web/API/Element Hint: you're looking for "id" Side note: I would recommend looking into using console.log() instead of alert(). The function outputs the information to your browser's web console instead of potentially bombarding you with alert boxes that you manually need to close. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/API/Console/log
  2. cyberRobot

    Hello all!

    Welcome ☺️
  3. cyberRobot

    PHP Help with variables

    What API are you using? Have you looked at the documentation? If the API allows for more than one number, I'm guessing you would need to group the numbers in some way, like with an array.
  4. 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.
  5. 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.
  6. 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/).
  7. 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?
  8. 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?
  9. 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. 😊
  10. 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.
  11. What is the exact error message you are seeing? It might help if you post the actual code block you're working with.
  12. cyberRobot

    New member Introduction

    Welcome
  13. cyberRobot

    Hiya Everyone!

    Hello 😊
  14. 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
  15. cyberRobot

    New member Introduction

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

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.