jeff5656 Posted March 8, 2008 Share Posted March 8, 2008 I have a form where a user can edit the record and then another script UPDATEs the record. The problem is that when I display the records, the cells in the HTML table do not adjust to fit the new comment. For instance I have a text box input type ($comments). If a user edits the record and types alot in there, it gets cut off in the display because the cell size does not change. If you re-edit that field, everything that was cut off is indeed lost. Here's my display.php <?php require('secure.php'); include "dateheader.php"; include "connectdb.php"; $query = "SELECT id_incr, patient_name, mrn, location, fellow, rcf_date, admission, consult_reason, impression, recs, comments ". "FROM active_consults WHERE signoff_status = 'a' ". "ORDER BY patient_name"; $results = mysql_query ($query) or die (mysql_error()); $num_pts = mysql_num_rows ($results); $consultheading =<<<EOD <table border = "1" cellpadding = "2" cellspacing = "2" align = "left"> <th> Name </th> <th> MRN </th> <th> Loc </th> <th> Fellow </th> <th> Date of Consult</th> <th> Reason for Admssion </th> <th> Reason for Consult </th> <th> Impression </th> <th> Recs </th> <th> Comments </th> </tr> EOD; echo $consultheading; while ($row = mysql_fetch_assoc ($results)) { ?> <tr> <td bgcolor="#CCCCCC" > <?php echo $row['patient_name'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['mrn'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['location'];?> </td> <td bgcolor="#CCCCCC" "> <?php echo $row['fellow'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['rcf_date'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['admission'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['consult_reason'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['impression'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['recs'];?> </td> <td bgcolor="#CCCCCC" > <?php echo $row['comments'];?> </td> <td bgcolor="#CCCCCC" > <a href="editpatient.php?action=edit&id=<?php echo $row['id_incr']; ?>">[EDIT]</a> </td> </tr> <?php } ?> <td> <h5>Total active patients: </h><?php echo $num_pts; ?> </td> </tr> <td align="center"><a href="newpatient.php">[ADD PATIENT]</a></td> </table> Thanks! Link to comment https://forums.phpfreaks.com/topic/95064-changing-cell-size/ Share on other sites More sharing options...
wildteen88 Posted March 8, 2008 Share Posted March 8, 2008 Sounds like a problem with the datatype for the comments field. What datatype is it set to within your database structure It sounds like it is set to VARCHAR. VARHAR can only hold a maximum of 255 characters change the field type to TEXT instead. Link to comment https://forums.phpfreaks.com/topic/95064-changing-cell-size/#findComment-486940 Share on other sites More sharing options...
jeff5656 Posted March 8, 2008 Author Share Posted March 8, 2008 That worked...than you!! Link to comment https://forums.phpfreaks.com/topic/95064-changing-cell-size/#findComment-486950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.