Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trunicating 1st letter in comments

Status
Not open for further replies.

dru312

Programmer
Nov 20, 2002
11
0
0
US
When I am pulling up my data from the mySQL database the 1st letter on my comments is getting trunicated. Any idea why??
 
are you sending the '\' - backslash with the comments if so use \\ to send a back slash. Also use php functions add_slashes() and strip_slashes() - see for more info. Thanx Dave Shaw!
 
Here is the code:

Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

<html>
<head>
	<title>The List Registration Form</title>


<script LANGUAGE=JAVASCRIPT>

<!--


function _CF_onError(form_object, input_object, object_value, error_message)
    {
	alert(error_message);
       	return false;	
    }



function _CF_hasValue(obj, obj_type)
    {
    if (obj_type == &quot;TEXT&quot; || obj_type == &quot;PASSWORD&quot;)
	{
    	if (obj.value.length == 0) 
      		return false;
    	else 
      		return true;
    	}
    else if (obj_type == &quot;SELECT&quot;)
	{
        for (i=0; i < obj.length; i++)
	    	{
		if (obj.options[i].selected)
			return true;
		}

       	return false;	
	}
    else if (obj_type == &quot;SINGLE_VALUE_RADIO&quot; || obj_type == &quot;SINGLE_VALUE_CHECKBOX&quot;)
	{

		if (obj.checked)
			return true;
		else
       		return false;	
	}
    else if (obj_type == &quot;RADIO&quot; || obj_type == &quot;CHECKBOX&quot;)
	{

        for (i=0; i < obj.length; i++)
	    	{
		if (obj[i].checked)
			return true;
		}

       	return false;	
	}
	}


function  _CF_checkCFForm_1(_CF_this)

    {

    if  (!_CF_hasValue(_CF_this.firstname, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.firstname, _CF_this.firstname.value, &quot;Please enter your first name&quot;))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.lastname, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.lastname, _CF_this.lastname.value, &quot;Please enter your last name&quot;))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.zip, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.zip, _CF_this.zip.value, &quot;Please enter your zip code&quot;))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.phone, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.phone, _CF_this.phone.value, &quot;Please enter your home phone&quot;))

            {

            return false; 

            }

        }
		
	if  (!_CF_hasValue(_CF_this.workphone, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.workphone, _CF_this.workphone.value, &quot;Please enter your work phone&quot;))

            {

            return false; 

            }

        }

    if  (!_CF_hasValue(_CF_this.mobile, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.mobile, _CF_this.mobile.value, &quot;Please enter your cell/pager, if none, enter 555-555-5555&quot;))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.email, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.email, _CF_this.email.value, &quot;Please enter your email address&quot;))

            {

            return false; 

            }

        }


    if  (!_CF_hasValue(_CF_this.email_confirm, &quot;TEXT&quot; )) 

        {

        if  (!_CF_onError(_CF_this, _CF_this.email_confirm, _CF_this.email_confirm.value, &quot;Please enter your email address confirmation&quot;))

            {

            return false; 

            }

        }

    if (_CF_this.email_confirm.value != _CF_this.email.value) {
        alert(&quot;Emails do not match!&quot;);
        return false;
    }
        
    return true;

    }


//-->

</script>

</head>

<body>
<div ALIGN=&quot;center&quot;>
<TABLE BORDER=&quot;1&quot; WIDTH=&quot;520&quot;>
<TR>
    <TD COLSPAN=&quot;2&quot;>
        Please fill out the following information and press the SUBMIT button to gain access to &quot;THE LIST&quot;.  The list is updated every Friday.
    </TD>
</TR>
<TR>
    <TD COLSPAN=&quot;2&quot;>* Required</TD>
</TR>
<FORM NAME=&quot;CFForm_1&quot; ACTION=&quot;reg.php&quot; METHOD=POST onSubmit=&quot;return _CF_checkCFForm_1(this)&quot;>

<TR>
    <TD>* First Name (example: Glen)</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;firstname&quot;>
    </TD>
</TR>
<TR>
    <TD>* Last Name (example: Calderon)</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;lastname&quot;>
    </TD>
</TR>
<TR>
    <TD>Address (example 123 Elm St.)</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;address&quot; SIZE=&quot;20&quot;>
    </TD>
</TR>
<TR>
    <TD>City</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;city&quot; SIZE=&quot;12&quot;>    
    </TD>
</TR>
<TR>
    <TD>State</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;state&quot; SIZE=&quot;8&quot;>    
    </TD>
</TR>
<TR>
    <TD>* Zip Code:</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;zip&quot; SIZE=&quot;8&quot;>
    </TD>
</TR>
<TR>
    <TD>* Home Phone (example: 718-835-8800)</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;phone&quot; SIZE=&quot;16&quot;>
    </TD>
</TR>
<TR>
    <TD>* Work Phone (example: 718-835-8800)</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;workphone&quot; SIZE=&quot;16&quot;>
    </TD>
</TR>
<TR>
    <TD>* Cell/Pager (example: 917-123-4567)<BR>(enter 555-555-5555 if none)</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;mobile&quot; SIZE=&quot;16&quot;>
    </TD>
</TR>
<TR>
    <TD>* Email (example: bob123@aol.com)</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;email&quot;>
    </TD>
</TR>
<TR>
    <TD>* Email address again</TD>
    <TD>
        <INPUT TYPE=&quot;Text&quot; NAME=&quot;email_confirm&quot;>
    </TD>
</TR>
<TR>
    <TD>* Are you a Real Estate Agent or Broker?</TD>
    <TD>
        <INPUT TYPE=&quot;Radio&quot; NAME=&quot;is_broker&quot; VALUE=&quot;1&quot;> Yes  
        <INPUT TYPE=&quot;Radio&quot; NAME=&quot;is_broker&quot; VALUE=&quot;0&quot; CHECKED> No
    </TD>
</TR>
<TR>
    <TD>* Are you a law Enforcement Officer or School Teacher?</TD>
    <TD>
        <INPUT TYPE=&quot;Radio&quot; NAME=&quot;is_law&quot; VALUE=&quot;1&quot;> Yes  
        <INPUT TYPE=&quot;Radio&quot; NAME=&quot;is_law&quot; VALUE=&quot;0&quot; CHECKED> No
    </TD>
</TR>
<TR>
    <TD COLSPAN=&quot;2&quot;>Comments/Requests  whatever you want to say or ask (300 characters max)</TD>
</TR>
<TR>
    <TD COLSPAN=&quot;2&quot; ALIGN=&quot;center&quot;>        
        <TEXTAREA NAME=&quot;comments&quot; COLS=&quot;42&quot; ROWS=&quot;10&quot;></TEXTAREA>
    </TD>
</TR>
<TR>
    <TD COLSPAN=&quot;2&quot; ALIGN=&quot;center&quot;>
        <INPUT TYPE=&quot;Submit&quot; VALUE=&quot;Register&quot;>            
        <INPUT TYPE=&quot;Reset&quot; VALUE=&quot;   Clear   &quot;>
    </TD>
</TR>

</FORM>
</TABLE>
</div>
</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top