Is this a PHP error?

I noticed this output


Strict Standards: Only variables should be passed by reference in /hermes/walnaweb10a/b2054/moo.teamluke/svr/edit_profile.php on line 16
	
<!DOCTYPE html>
<html lang="en">
<head>
...

on my page,


What does it mean?
Here is my PHP before any HTML

<?php
session_start();
include("db/configPDO.php");

if(isset($_SESSION['id']))  
{ 

$Id = $_SESSION['id']; 

	include "php/clean_data.php";

	$sql =  "SELECT name,email,phone,about,avatar,password FROM users WHERE id = :id AND display = 1";

	$STM = $conn->prepare($sql);
	
	$STM->bindParam(":id", test_input($Id));
	
	$STM->execute();
	$count = $STM->rowCount();
	
	$row  = $STM -> fetch();

?>	

I think the problem is passing a function call as a parameter. Try assigning a variable to the function call and passing the variable instead.

1 Like

better use bindValue() instead of bindParam()

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.