0 Replies - 3914 Views - Last Post: 08 February 2010 - 02:02 AM Rate Topic: -----

#1 skywalkno8  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 07-December 08

data from database does not display in textbox

Posted 08 February 2010 - 02:02 AM

plz help me.. i am having a problem where i wanted to display the data from database.. the data is displayed as normal but at when i wanted to display it in text box the data does not fully retrieve from the database.. example; i wanted to display "Jack running" but in the textbox it only display only the first letters "Jack" ... here the code
<?php
if(isset($_POST['submit'])){ 
	  if(isset($_GET['go'])){  
	  	$edit=$_POST['edit']; 
	  	

$con = mysql_connect("localhost","root","");
mysql_select_db("customer info", $con);

$result=mysql_query("SELECT * FROM record WHERE Name LIKE '%" . $edit .  "%' "); 
if (!$result)
  {
  die('Could not connect: ' . mysql_error());
  }
  

$sql_num=mysql_num_rows($result);
echo "<table border='1'>";
echo "<tr>
		<td><b>Name</b></td>
		<td><b>Contact No</b></td>
		<td><b>Email ID</b></td>
		<td><b>Company Name</b></td>
		<td><b>Address</b></td>	
		<td><b>Office</b></td>	
		<td><b>Fax</b></td>	
		<td><b>Remarks</b></td>
	</tr>" ;
	
while($row=mysql_fetch_array($result)){ 
	  		
			
			
			
			echo "<form  method='post' action='done.php?go'  id='update'>";
			echo "<tr>";
			echo "<td><input  size='10%' type='text' name='Name' value="<?php echo $row['Name'] ?>"></td>";
			
			echo "<td><input size='10%' type='text' name='Contact' value="<?php echo <$row['Contact'] ?>"></td>";
			echo "<td><input type='text' name='Email' value="<?php echo $row['Email'] ?>"></td>";
			echo "<td><input type='text' name='Company' value="<?php echo $row['Company'] ?>"></td>";
			echo "<td><input size='30%' type='text' name='Address' value="<?php echo $row['Address'] ?>"></td>";
			echo "<td><input size='10%' type='text' name='telefon' value="<?php echo $row['telefon'] ?>"></td>";
			echo "<td><input size='10%' type='text' name='FaxNo' value="<?php echo $row['FaxNo'] ?>"></td>";
			echo "<td><input size='39%' type='text' name='Lainlain' value="<?php echo $row['Lainlain'] ?>"></td>";
			echo "</tr>";
		  } 
	  } 
	  	} 

	  echo "</table>";
?>




Is This A Good Question/Topic? 0
  • +

Page 1 of 1