trimming hashed user ID
http://www.vidyasocks.com/forums.php?id=1&id=1

As you can see near the bottom I am trying to trim down the characters to only 10. I know to use $title = $substr($title,0,10); but I keep getting an error, Fatal error: Function name must be a string in D:\Hosting\8763814\html\post2.php on line 31

This is my code.

 or die('Error connecting to MySQL server.');
	
	$name=   $_POST['name'];
	$title=  sha1($_POST['title']);
	$texts= $_POST['texts'];
	$forum_id = $_POST['forum_id'];
	
	
	
		
		$name = str_replace("'","''",$name);
		$title = str_replace("'","''",$title);
		$texts = str_replace("'","''",$texts);
		
		
		$title = $substr($title,0,10);
		
		
		$sql = "INSERT INTO post (name,title, texts, forum_id) VALUES ('$name', '$title', '$texts', '$forum_id')";
		mysqli_query($conn1, $sql) or die('Error inserting to database.');
		mysqli_close($conn1);
trimming hashed user ID
===

http://www.vidyasocks.com/forums.php?id=1&id=1

As you can see near the bottom I am trying to trim down the characters to only 10. I know to use $title = $substr($title,0,10); but I keep getting an error, Fatal error: Function name must be a string in D:\Hosting\8763814\html\post2.php on line 31

This is my code.

 or die('Error connecting to MySQL server.');
	
	$name=   $_POST['name'];
	$title=  sha1($_POST['title']);
	$texts= $_POST['texts'];
	$forum_id = $_POST['forum_id'];
	
	
	
		
		$name = str_replace("'","''",$name);
		$title = str_replace("'","''",$title);
		$texts = str_replace("'","''",$texts);
		
		
		$title = $substr($title,0,10);
		
		
		$sql = "INSERT INTO post (name,title, texts, forum_id) VALUES ('$name', '$title', '$texts', '$forum_id')";
		mysqli_query($conn1, $sql) or die('Error inserting to database.');
		mysqli_close($conn1);