Jump to content

cyberRobot

Moderators
  • Posts

    3,145
  • Joined

  • Last visited

  • Days Won

    37

Everything posted by cyberRobot

  1. The function doesn't seem to be defined there. You may have better luck looking at the file imported here: require_once("init.php"); Note: if you decide to post this code, make sure it doesn't contain an sensitive information such as database log-in credentials. To find the function, you're basically looking for something like this: function required() { }
  2. The following line of code calls a user-defined function named required() ...marked <?php echo required();?> are... This function was defined by someone who created your website. To fix the issue, you'll need to find the code for that function. You could try searching your PHP file for the function. If that doesn't work you could try posting more of your script. Perhaps we could help locate the function information for you.
  3. Could you show us the code for the required() function?
  4. Try changing this: error_message = data.message; To this: error_message += data.message; More information about the addition assignment operator can be found here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Assignment_Operators#Addition_assignment
  5. Perhaps the examples here will help: https://www.google.com/search?q=pagination+with+array_slice
  6. Congrats CroNiX!
  7. Got it; thanks!
  8. I assume that "eventually destory" means that it will be destroyed as soon as the next query executes and the variable is overwritten...is that correct? I have yet to use the MYSQLI_USE_RESULT flag, but I appreciate the warning. Thanks for your help Jacques1!
  9. I have gotten into the habit of freeing MySQLi result objects once they are no longer needed. However, I'm curious about the cases where multiple MySQLi objects are being used. If I use the same variable to store the result objects, do I still need to call the free() method for each object? Or is an object automatically freed once the variable is overwritten with the new object?
  10. Sorry about that; I didn't mean any offense. I was just having a difficult time deciding on whether this topic should be moved to the Job Offerings forum. If you're still looking for help, perhaps someone here can answer your questions. We just don't have much to go on right now. Perhaps the following article will help you get the answers you're looking for from us: http://catb.org/~esr/faqs/smart-questions.html Please don't take offense to the article title. I'm just suggesting it based on PHPFreak's Rules and ToS page:
  11. $_POST is an associative array; more information can be found here: http://php.net/manual/en/reserved.variables.post.php
  12. Are you looking to hire / pay someone? If so, please post in the Job Offerings forum: http://forums.phpfreaks.com/forum/77-job-offerings/
  13. For what it's worth, this <INPUT TYPE=\"text\" NAME=\"employee\" VALUE=\"$_POST['employee']\" SIZE=\"75\" MAXLENGTH=\"100\"></p> Should have been this <INPUT TYPE=\"text\" NAME=\"employee\" VALUE=\"{$_POST['employee']}\" SIZE=\"75\" MAXLENGTH=\"100\"></p> Note the curly brackets around the array variable. Of course, that still wouldn't fix the undefined variable. To fix that error, you could use a solution like the one suggested by jcbones I disagree. There is value in knowing how to take an outdated program and prepare it for today's standards. This likely won't be the last time rjo98 needs to upgrade someone else's script. The more experience rjo98 has in upgrading scripts, the faster the process will go.
  14. @rjo98 - You could also simplify the code by using single quotes: $form_block = " <FORM METHOD='post' ACTION=''> Or you could look into separating the HTML code from the PHP code. Of course, that's going to take a bit more work.
  15. Since you're updating the script, it's worth noted that using the raw value from PHP_SELF in the form's action attribute opens your website up to XSS attacks. More information can be found here: http://seancoates.com/blogs/xss-woes Also, the <font> tag was deprecated in HTML 4.01 and marked obsolete in HTML 5. If you haven't done so already, you'll want to look into using CSS instead. More information can be found here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font
  16. Just to clarify, the mysql_* functions have been deprecated and will be removed in an upcoming version of PHP. Instead, you can use MySQLi or PDO. More information can be found here: http://php.net/manual/en/mysqlinfo.api.choosing.php
  17. Is there something specific you are trying to accomplish...or are you just wondering about the header() function?
  18. You could use microtime(): http://php.net/manual/en/function.microtime.php
  19. Have you tried echoing the entire contents of the SESSION array to see what it contains? For example, you could add the following after your call to session_start() in the script which sets the email variable: <?php session_start(); echo '<pre>' . print_r($_SESSION, true) . '</pre>'; ?>
  20. It might help if you post the updated code. When posting the code, please surround it with tags. It makes your post and code easier to follow. Also note that echo shouldn't be used after an assignment operator. This: $slider_pagination = echo '<a href="' . get_permalink($post->ID) . '">' .get_the_title() . '</a>'; Should be this: $slider_pagination[] = '<a href="' . get_permalink($post->ID) . '">' .get_the_title() . '</a>';
  21. Side note: there's probably a reason you're using JavaScript to redirect the page. But just in case you're not aware, you can redirect visitors using PHP and the header() function. More information can be found here: http://php.net/manual/en/function.header.php
  22. Can you post the code which sets $_SESSION["Email"]...the one that appears to remove $_SESSION['patchurl']? Also, please surround the code with tags. It will make your post and code easier to follow.
  23. Just be aware that mysql_* functions have been deprecated. If you're not doing so already, you'll need to switch to PDO or MySQLi at some point. More information can be found here: http://php.net/manual/en/mysqlinfo.api.choosing.php
  24. If you are looking to hire / pay someone, you could post something in the Job Offerings section: http://forums.phpfreaks.com/forum/77-job-offerings/
  25. For some reason I thought the space didn't matter, but you're right. I must have removed it subconsciously when I ran my tests.
×
×
  • 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.