Jump to content

cyberRobot

Moderators
  • Content Count

    2,988
  • Joined

  • Last visited

  • Days Won

    25

cyberRobot last won the day on January 24

cyberRobot had the most liked content!

Community Reputation

119 Excellent

About cyberRobot

  • Rank
    Much to Learn

Contact Methods

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

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

85,113 profile views
  1. Please review the Guidelines page for the forum (https://forums.phpfreaks.com/guidelines/). Rule #5 states the following: If you are looking to promote WordPress, your opinions, etc., there are other avenues that you can pursue. For example, you could start your own blog. If cost is an issue, there are free blogging options available, like WordPress.com.
  2. So...is there an actual question here...is this just a blog post? If it's the latter, please refrain from posting things like this here. Unless someone specifically asks about how child-themes work in WordPress. Even if they ask, it would be better to point them to the WordPress manual.
  3. Also, can I ask what's going on here: $num1 = (5); Is there a reason for the parentheses? Apparently PHP doesn't care if they are there. PHP appears to ignore them. Unless there is a reason for using the parentheses, it would be clearer to use the following: $num1 = 5;
  4. There's a syntax error in your if statement. The following manual page provides examples on writing if statements: https://www.php.net/manual/en/control-structures.elseif.php It might also help to review the following page when it comes to the comparison operator: https://www.php.net/manual/en/language.operators.comparison.php
  5. So basically, you are looking to loop through an array of numbers. For each number, you want to display the name that corresponds with that number. So in your loop, when you get to 5, it should display "Lee". And 2 should be "John". Correct? If so, where are you stuck? What have you tried so far? Be aware that PHP arrays don't start with 1 for the index, by default.
  6. Alternatively, you could just update the line that defines $site_title. That way you're not calling get_the_title() multiple times. Plus, the value should be escaped for inclusion in an HTML attribute. $site_title = esc_attr( get_the_title() ); As for the following, WordPress' the_title() function echos the value be default. I forget what happens when you try to echo something that has already been echoed in WordPress, but that probably lead to the issues you were having.
  7. Perhaps the link below will help. Note the first example on the page. https://www.php.net/manual/en/control-structures.if.php
  8. So you're looking to add "Order id..." above the table? If so, you should be able to add that information to the $finalMessage variable, before the open <table> tag.
  9. Also note that you are naming the variable "var1". In SCAction.php, it looks like you are expecting a variable named "SC" here: $SC=stripslashes($_GET['$SC']);
  10. Did you see Barand's response about PHP variables needing to be outputted in PHP? Try changing this <FORM METHOD="POST" ACTION="SCAction.php/?cmd= set&var1=$SC2"> To this <FORM METHOD="POST" ACTION="SCAction.php/?cmd= set&var1=<?=$SC2?>"> Note the $SC2 variable at the end.
  11. Sorry, I misread your post. Are the values in the FINISHED column stored as a MySQL DATE type? If not, switching the column type will make this much easier.
  12. You could use MySQL's YEAR() function to extract the year from the FINISHED column. Then sort by that. https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_year
  13. As for the other error, $update isn't defined unless the form is submitted. You could add isset() to the following line: if(isset($update)){
  14. What does your updated code, where you tried using glob(), look like? The only line you've shown for that is the following: $directoryList = glob($directory); If that's the code you're referring to, we'll need to at least see what $directory is set to.
  15. Be aware that is_numberic() will accept values that you likely won't want. More information can be found here: https://www.php.net/manual/en/function.is-numeric.php If the values are supposed to be whole numbers, you could give this function a shot: https://www.php.net/manual/en/function.ctype-digit.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.