Click here to Skip to main content
16,021,449 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
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 
I'm trying to migrate my PHP code which is working on PHP 7.4 to PHP 8.1.

With PHP 8.1, following
PHP
if($message_id == "") {
code is triggering for logged in users too.

Can somebody point out common errors in this code?

PHP
require_once("inc_common.php");
include($engine_path."users_get_list.php");
set_variable("message_id");
set_variable("send_to");
set_variable("send_to_id");
$send_to_id = intval($send_to_id);
if (!$exists)  {
	$error_text = "$w_no_user";
	include($file_path."designes/".$design."/error_page.php");
	exit;
}

$u_ids = array();
$u_names = array();
$tmp_body = "";
$tmp_subject = "";

$info_message = "";

if($message_id == "") {
	if ($send_to!="") {
		$user_to_search = $send_to;
		include($ld_engine_path."users_search.php");
		if (!count($u_ids)) $info_message = "".str_replace("~",""".htmlspecialchars($send_to).""",$w_search_no_found)."<br>";
	}
	if ($send_to_id!="") {
		include("inc_user_class.php");
		$ttt = $is_regist;
		$is_regist = $send_to_id; #fake again :(
		include($ld_engine_path."users_get_object.php");
		$u_ids[] = $is_regist;
		$is_regist = $ttt;
		$u_names[] = $current_user->nickname;
	}
}
else {
	$board_operation = "reply";
	$id = $message_id;
	include($ld_engine_path."board_process_message.php");
	$u_ids[] = $board_message["from_id"];
	$u_names[] = $board_message["from"];
	$tmp_body =  str_replace("<br>","\n",$board_message["body"]);
	$tmp_body  = "\n\n_______ ".str_replace("~", $board_message["from"], $w_user_wrote)." ______\n$tmp_body";
	$tmp_subject = str_replace("\"",""","Re: ".$board_message["subject"]);
}

include($file_path."designes/".$design."/board_send.php");


modified 30-Mar-23 1:04am.

AnswerRe: If command triggering at wrong time with PHP 8.1 Pin
Richard Deeming29-Mar-23 21:22
mveRichard Deeming29-Mar-23 21:22 
GeneralRe: If command triggering at wrong time with PHP 8.1 Pin
Aruna KN29-Mar-23 21:27
Aruna KN29-Mar-23 21:27 
GeneralRe: If command triggering at wrong time with PHP 8.1 Pin
Aruna KN29-Mar-23 22:15
Aruna KN29-Mar-23 22:15 
QuestionBlank space or NULL with PHP 8.1 Pin
Aruna KN14-Mar-23 22:57
Aruna KN14-Mar-23 22:57 
AnswerRe: Blank space or NULL with PHP 8.1 Pin
Richard MacCutchan15-Mar-23 7:10
mveRichard MacCutchan15-Mar-23 7:10 
QuestionPHP Fatal error: Uncaught TypeError: count() Pin
Aruna KN10-Mar-23 20:17
Aruna KN10-Mar-23 20:17 
AnswerRe: PHP Fatal error: Uncaught TypeError: count() Pin
Graham Breach11-Mar-23 1:45
Graham Breach11-Mar-23 1:45 
GeneralRe: PHP Fatal error: Uncaught TypeError: count() Pin
Aruna KN11-Mar-23 16:32
Aruna KN11-Mar-23 16:32 
Questionhtaccess %3F redirect issue Pin
Aruna KN10-Mar-23 19:40
Aruna KN10-Mar-23 19:40 
QuestionHow to develop a game using implement the api Pin
piumini sakunthala2-Feb-23 21:06
piumini sakunthala2-Feb-23 21:06 
QuestionRe: How to develop a game using implement the api Pin
Richard MacCutchan2-Feb-23 21:41
mveRichard MacCutchan2-Feb-23 21:41 
QuestionWordpress shortcode prints wrong value from custom post type Pin
moinmobility9-Oct-22 7:36
moinmobility9-Oct-22 7:36 
Questionimplement ElFinder in PHP language Pin
Alexis Sanchez Vanegas19-May-22 4:28
Alexis Sanchez Vanegas19-May-22 4:28 
QuestionAapanel upload project laravel Pin
marziyeh barooei9-May-22 1:05
marziyeh barooei9-May-22 1:05 
Questionhow do I get total quantity from this code Pin
wixily jnr28-Apr-22 13:29
wixily jnr28-Apr-22 13:29 
AnswerRe: how do I get total quantity from this code Pin
Richard MacCutchan28-Apr-22 21:31
mveRichard MacCutchan28-Apr-22 21:31 
QuestionROLES ET PRIVILEGES UTILISATEURS D'UN SITE Pin
ameb290825-Apr-22 4:06
ameb290825-Apr-22 4:06 

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.