Click here to Skip to main content
15,890,438 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
QuestionHow To Find 'DOES NOT CONTAIN' or 'DOES CONTAIN' in Php ? Pin
Member 159745539-Apr-23 10:27
Member 159745539-Apr-23 10:27 
AnswerRe: How To Find 'DOES NOT CONTAIN' or 'DOES CONTAIN' in Php ? Pin
Richard MacCutchan9-Apr-23 22:20
mveRichard MacCutchan9-Apr-23 22:20 
QuestionHow To Order By Adding Columns Values In SQL? Pin
Member 159745539-Apr-23 10:25
Member 159745539-Apr-23 10:25 
AnswerRe: How To Order By Adding Columns Values In SQL? Pin
jschell10-Apr-23 5:57
jschell10-Apr-23 5:57 
GeneralRe: How To Order By Adding Columns Values In SQL? Pin
Member 1597455310-Apr-23 6:35
Member 1597455310-Apr-23 6:35 
GeneralRe: How To Order By Adding Columns Values In SQL? Pin
jschell11-Apr-23 4:36
jschell11-Apr-23 4:36 
QuestionOnly few Errors left before Upgrading to PHP 8.1 Pin
Aruna KN8-Apr-23 6:40
Aruna KN8-Apr-23 6:40 
QuestionPHP isset for an Array Pin
Aruna KN6-Apr-23 4:51
Aruna KN6-Apr-23 4:51 
Previously with help of this forum I was able to fix Undefined variable errors using if(isset()) for PHP 8.1.

But this time I was unable to use if(isset()) to fix this error_log:

PHP Warning: Undefined variable $sendid in /home/____/check.php on line 70

Code line 70 is

PHP
printm($str.$sendid);


As above line connected with an array, how can I use isset? Please suggest me a solution.

Full code is given below:

PHP
<?php
include_once 'include/config.inc.php';
include_once 'include/options.inc.php';
include_once 'include/functions.inc.php';
include_once 'include/security.inc.php';
include_once 'templates/'.C_TEMP.'/config.php';
include_once 'templates/'.C_TEMP.'/header.php';

// if(!isset($id)||!isset($code)||!is_numeric($id)||!ereg('^[0-9A-Za-z]',$code)) {
if(!isset($id)||!isset($code)||!is_numeric($id)||!preg_match('/^[0-9A-Za-z]/',$code)) {  
// Code must content only chars and numbers :)
   printm($w[1].'3');
   }
 
/// Check for users with code expired and remove these users
$temp = mysqli_query($conn,"SELECT id FROM ".C_MYSQL_TEMP." WHERE date < DATE_SUB(NOW(), INTERVAL ".C_REG_DAYS." DAY)");
while ($i = mysqli_fetch_array($temp))
{
  $tmp = mysqli_query($conn,"SELECT pic1, pic2, pic3 FROM ".C_MYSQL_MEMBERS." WHERE id='".$i['id']."' and status = '0'");
  while ($j = mysqli_fetch_array($tmp))
  {
    for($k = 1; $k <= 3; $k++) 
  	{
			$tmpm = 'pic'.$k;
     	if (($j[$tmpm] != '') && (is_file(C_PATH.'/members/uploads/'.$j[$tmpm]))) 
			{
		 		@unlink (C_PATH.'/members/uploads/'.$j[$tmpm]);
			}	
    }
 		@mysqli_query($conn,"DELETE FROM ".C_MYSQL_MEMBERS." WHERE id='".$i['id']."' and status = '0'");
	}	
	@mysqli_query($conn,"DELETE FROM ".C_MYSQL_TEMP." WHERE id='".$i['id']."'");
}
/////////////


  
$temp=mysqli_query($conn,"SELECT count(*) as total FROM ".C_MYSQL_TEMP." WHERE id='".$id."' AND code='".$code."' AND date > DATE_SUB(NOW(), INTERVAL ".C_REG_DAYS." DAY)");
$row=mysqli_fetch_array($temp);
$count = $row['total'];
if($count != '0') {
   mysqli_query($conn,"DELETE FROM ".C_MYSQL_TEMP." WHERE id='".$id."' AND code='".$code."'");
   if(C_CHECK_REGISTER == '3') {
      $status='1';
      $str=$w[159];
   } 
   else {
      $status='7';
      $str = $w[46];
   } 
mysqli_query($conn,"UPDATE ".C_MYSQL_MEMBERS." SET status='".$status."' WHERE id='".$id."'");
$result = mysqli_query($conn,'SELECT email, password FROM '.C_MYSQL_MEMBERS.' WHERE id = \''.$id.'\'');
   while($i=mysqli_fetch_array($result) && $status == "7") {
$tm=array(C_SNAME);
$subject=template($w[195],$tm);
switch (C_ID) {
  
  case '2':
    $sendid=$i['email'];
  break;
  default: 
    $sendid=$id;
  break;
  }
  
$tm=array($sendid,'____',C_SNAME);
$message=template($w[588],$tm);
sendmail(C_FROMM,$i['email'],$subject,$message,'text');
}
printm($str.$sendid);
}

else {
     unset($id);
     printm($w[161]);
}
include_once 'templates/'.C_TEMP.'/footer.php';
 ?>

AnswerRe: PHP isset for an Array Pin
Richard MacCutchan6-Apr-23 6:06
mveRichard MacCutchan6-Apr-23 6:06 
GeneralRe: PHP isset for an Array Pin
Aruna KN8-Apr-23 5:06
Aruna KN8-Apr-23 5:06 
GeneralRe: PHP isset for an Array Pin
Richard MacCutchan8-Apr-23 5:09
mveRichard MacCutchan8-Apr-23 5:09 
GeneralRe: PHP isset for an Array Pin
Aruna KN8-Apr-23 5:19
Aruna KN8-Apr-23 5:19 
GeneralRe: PHP isset for an Array Pin
Aruna KN8-Apr-23 5:25
Aruna KN8-Apr-23 5:25 
GeneralRe: PHP isset for an Array Pin
Richard MacCutchan8-Apr-23 5:33
mveRichard MacCutchan8-Apr-23 5:33 
GeneralRe: PHP isset for an Array Pin
Aruna KN8-Apr-23 5:55
Aruna KN8-Apr-23 5:55 
QuestionPHP Warning: Undefined variable $conn Pin
Aruna KN3-Apr-23 2:45
Aruna KN3-Apr-23 2:45 
AnswerRe: PHP Warning: Undefined variable $conn Pin
Richard MacCutchan3-Apr-23 2:50
mveRichard MacCutchan3-Apr-23 2:50 
GeneralRe: PHP Warning: Undefined variable $conn Pin
Aruna KN3-Apr-23 3:48
Aruna KN3-Apr-23 3:48 
QuestionPHP 8.1 Count issue Pin
Aruna KN30-Mar-23 0:06
Aruna KN30-Mar-23 0:06 
AnswerRe: PHP 8.1 Count issue Pin
Richard MacCutchan30-Mar-23 0:45
mveRichard MacCutchan30-Mar-23 0:45 
AnswerRe: PHP 8.1 Count issue Pin
Richard Deeming30-Mar-23 0:45
mveRichard Deeming30-Mar-23 0:45 
GeneralRe: PHP 8.1 Count issue Pin
Aruna KN30-Mar-23 1:38
Aruna KN30-Mar-23 1:38 
GeneralRe: PHP 8.1 Count issue Pin
Richard Deeming30-Mar-23 2:53
mveRichard Deeming30-Mar-23 2:53 
GeneralRe: PHP 8.1 Count issue Pin
Aruna KN30-Mar-23 3:21
Aruna KN30-Mar-23 3:21 
QuestionIf command triggering at wrong time with PHP 8.1 Pin
Aruna KN29-Mar-23 18:56
Aruna KN29-Mar-23 18:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.