Samurai Legend Posted June 27, 2014 Share Posted June 27, 2014 I get this error - A non-critical error has occurred. Page execution will continue. Below are the details:<br /><strong>PHP Notice</strong>: Undefined index: user_for (8)<br /><br /><strong>Line executed</strong>: /home/samurai/public_html/donate.php:371<br /><br />1 Line 360 - 380 - } $(document).ready(function() { $('#confirm_popup').center(); $('#confirm_popup_back,#popup_close').click(function() { $(this).fadeOut(500); $('#confirm_popup').fadeOut(500); }); }); $(document).ready(function() { $('#userTo').click(function() { if($(this).children('[name=userTo]').length == 0) { $(this).html('<input type="text" name="userTo" size="3" value="<?php echo (abs((int) $_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" style="font-size: 12px;font-family: Tahoma;padding:0;margin:0;text-align: center;" />'); $('[name=userTo]').focus(); } }); $('#userTo').keypress(function(e){ if(e.which == 13){ var username = $('[name=userTo]').val(); $.ajax({ type: "GET", url: "donate.php", Line 371 - $(this).html('<input type="text" name="userTo" size="3" value="<?php echo (abs((int) $_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" style="font-size: 12px;font-family: Tahoma;padding:0;margin:0;text-align: center;" />'); I don't know how to fix it :/ Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted June 28, 2014 Share Posted June 28, 2014 the error is in your value... value="<?php echo (abs((int) $_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" Do you see what you did there? hint (echo) Quote Link to comment Share on other sites More sharing options...
Djkanna Posted June 28, 2014 Share Posted June 28, 2014 Attempting to access an array key which has not been defined is the same as accessing any other undefined variable: an E_NOTICE-level error message will be issued, and the result will be NULL. Source -2short-amazingly- Quote Link to comment Share on other sites More sharing options...
Dave Posted June 29, 2014 Share Posted June 29, 2014 I get this error - A non-critical error has occurred. Page execution will continue. Below are the details:<br /><strong>PHP Notice</strong>: Undefined index: user_for (8)<br /><br /><strong>Line executed</strong>: /home/samurai/public_html/donate.php:371<br /><br />1 Line 360 - 380 - } $(document).ready(function() { $('#confirm_popup').center(); $('#confirm_popup_back,#popup_close').click(function() { $(this).fadeOut(500); $('#confirm_popup').fadeOut(500); }); }); $(document).ready(function() { $('#userTo').click(function() { if($(this).children('[name=userTo]').length == 0) { $(this).html('<input type="text" name="userTo" size="3" value="<?php echo (abs((int) $_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" style="font-size: 12px;font-family: Tahoma;padding:0;margin:0;text-align: center;" />'); $('[name=userTo]').focus(); } }); $('#userTo').keypress(function(e){ if(e.which == 13){ var username = $('[name=userTo]').val(); $.ajax({ type: "GET", url: "donate.php", Line 371 - $(this).html('<input type="text" name="userTo" size="3" value="<?php echo (abs((int) $_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" style="font-size: 12px;font-family: Tahoma;padding:0;margin:0;text-align: center;" />'); I don't know how to fix it :/ I do provide free support for all my modules! This is due to me being awful at using isset when I built this many years ago. If you change line 371 to the following it'll work fine, depending on what version you have their maybe other instances of issues like this. $(this).html('<input type="text" name="userTo" size="3" value="<?php echo (isset($_COOKIE['user_for']) ? abs((int) $_COOKIE['user_for']) : $ir['userid']); ?>" style="font-size: 12px;font-family: Tahoma;padding:0;margin:0;text-align: center;" />'); Get in contact with me via Skype and I'll give you the latest version: oxydennet, providing you paid for it! Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted June 29, 2014 Author Share Posted June 29, 2014 Omg thanks Dave! Much appreciated! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.