Jump to content
MakeWebGames

Recommended Posts

Posted

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 :/

Posted

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)

Posted

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-

Posted
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!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...