Question : How do I count the number of characters in the attached php function and send alert message?

I have the attach function in one of my clients php web apps.

In short it take values from various fields in the app, throws all values into one variable
sends that variable to aa field in another database.  

The issue is the fields that receives this data only allows2K characters which the client is always exceeding.  How can I count the characters in this function and if they
exceek 2K, send them an alert message and stop the app from submitting the request?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
function getAllDataInput($aAnswers)
{
	$sDesc="REQUEST INFORMATION
Project Purpose: {$aAnswers['Q_42']}
Communication Medium: {$aAnswers['Q_12']}
Project Components: {$aAnswers['Q_35']}
Project Description: {$aAnswers['Q_14']}
Final Size: {$aAnswers['Q_21']}
Colors: {$aAnswers['Q_22']}
Delivery Instructions: {$aAnswers['Q_24']}
Special Instructions: {$aAnswers['Q_27']}

\r\n
INSURANCE INFORMATION
Creative Resources: {$aAnswers['Q_9']}
Project Placement: {$aAnswers['Q_15']}
Intended Audience: {$aAnswers['Q_16']}
Duration of Use: {$aAnswers['Q_18']}
Frequency of Use: {$aAnswers['Q_19']}
Consumer Facing: {$aAnswers['Q_17']}";


	return $sDesc;
}

Answer : How do I count the number of characters in the attached php function and send alert message?

This error was caused by the fact that the db from which the select * from   msdb.dbo.sysdtspackages90 was being executed was not set as trustworthy.
Random Solutions  
 
programming4us programming4us