this line won't print all the text

Discussion in 'PHP' started by jacka, May 20, 2008.

  1. #1
    Hi
    I have a simple php code that retrieves the data and then I would like to place , the data, in a table.
    For some strange reason the $row[Descr] content won't fully print.
    Instaed of "this is a test" . it just prints "this".

    I have tested the data outside the table content , as you can see from
    echo $row[Descr];
    Code (markup):
    , which it is displayed properly.
    I am using the following code:
    
    echo $row[Descr];
    					
    					echo "</td>";
    					echo "</tr>";
    					echo "<tr class='below'>";
    				
    					
    					echo "<td width='117'  align='center'><input size='12'  name='partn'  class='input'  value=". $row[part_number]." >  </td>";
    						echo "<td width='85'  align='center'><input size='9'  class='input' name='nameeach'  value=".$row[Price]."  	>	</td>";
    					
    					echo "<td width='200'   align='center' ><input size='30'  name='Descr'  class='input' value=".$row[Descr]."  	>	</td>";
    						echo "<td width='156'  ><a target='_blank' href='../C28reduced/C28'".
    	$rowpdf[page_number]."pdf' ><img class='pdf' src='../images/pdflogo.gif' >	</a>	</td>";
    		
    					
    
    Code (markup):
    there is enough space for it to get printed too.
    I am so confused.

    Thanks in advance guys.
    :confused::confused:
     
    jacka, May 20, 2008 IP
  2. Ratty

    Ratty Active Member

    Messages:
    565
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    95
    Digital Goods:
    1
    #2
    try putting single quotes around the contents of value like this

    echo "<td width='200'   align='center' ><input size='30'  name='Descr'  class='input' value='".$row[Descr]."'  	>	</td>";
    Code (markup):
     
    Ratty, May 20, 2008 IP
  3. Awesome Ninja

    Awesome Ninja Peon

    Messages:
    141
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are you sure the row Desc in phpmyadmin has not got a limit on it only allowing you to insert a maximum string, thats probaly why it only displays test.
     
    Awesome Ninja, May 20, 2008 IP
  4. relixx

    relixx Active Member

    Messages:
    946
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    70
    #4
    I agree with Ratty. The problem is that, without quotes, each word gets treated like another HTML element.
     
    relixx, May 22, 2008 IP