ballhogjoni Posted May 10, 2007 Share Posted May 10, 2007 This is my code that pulls the info from the db, but it seems like the code cant print the info from the db. Basically it acts as if my comments column is empty after it finds out its not empty. if (!empty($row['comments'])) { echo '<p align="center">'; echo '<table align="center" width="800">'; echo '<tr>'; echo '<td align="center">'; echo '<form action="" method="post">'; echo '<table border="1">'; echo '<tr>'; echo '<td align="center" colspan="8">'; echo '<b>Only Choose One Disposition</b>'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td align="center" width="100">'; echo 'Too Small<br><input type="checkbox" name="too_small" value="Too Small">'; echo '</td>'; echo '<td align="center" width="100">'; echo 'Money<br><input type="checkbox" name="money" value="Money">'; echo '</td>'; echo '<td align="center" width="100">'; echo 'Time<br><input type="checkbox" name="time" value="Time">'; echo '</td>'; echo '<td align="center" width="100">'; echo 'Not Interested<br><input type="checkbox" name="not_inter" value="Not Interested">'; echo '</td>'; echo '<td align="center" width="100">'; echo 'Client<br><input type="checkbox" name="client" value="Client">'; echo '</td>'; /*echo '<td align="center" width="100">'; echo 'Demo<br><input type="checkbox" name="demo" value="Demo">'; echo '</td>';*/ echo '<td align="center" width="100">'; echo 'Not Contacted<br><input type="checkbox" name="notContacted" value="Not Contacted">'; echo '</td>'; echo '<td align="center" width="100">'; echo 'Call Back<br><input type="checkbox" name="callBack" value="Call Back">'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td align="center" colspan="8">'; echo '<textarea name="comments" cols="70" rows="5">'.$row['commments'].'</textarea>'; echo '</td>'; echo '</tr>'; echo '<tr>'; echo '<td align="center" colspan="8">'; echo '<input type="submit" value="Submit Your Disposition">'; echo '</td>'; echo '</tr>'; echo '</table>'; echo '</form>'; echo '</td>'; echo '</tr>'; echo '</table>'; echo '</p>'; } Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted May 10, 2007 Author Share Posted May 10, 2007 anyone? Quote Link to comment Share on other sites More sharing options...
CSmith1128 Posted May 10, 2007 Share Posted May 10, 2007 are you supposed to have 3 "mmm"s in .$row['commments'] ? Quote Link to comment Share on other sites More sharing options...
ballhogjoni Posted May 10, 2007 Author Share Posted May 10, 2007 lol thats it. Thank you, spelling error Quote Link to comment Share on other sites More sharing options...
CSmith1128 Posted May 10, 2007 Share Posted May 10, 2007 haha no problem Quote Link to comment Share on other sites More sharing options...
chronister Posted May 10, 2007 Share Posted May 10, 2007 Why all the echos?? There is no need to complicate code like that. Try this instead. <?php if (!empty($row['comments'])) { ?> <p align="center"> <table align="center" width="800"> <tr> <td align="center"> <form action="" method="post"> <table border="1"> <tr> <td align="center" colspan="8"> <b>Only Choose One Disposition</b> </td> </tr> <tr> <td align="center" width="100"> Too Small<br><input type="checkbox" name="too_small" value="Too Small"> </td> <td align="center" width="100"> Money<br><input type="checkbox" name="money" value="Money"> </td> <td align="center" width="100"> Time<br><input type="checkbox" name="time" value="Time"> </td> <td align="center" width="100"> Not Interested<br><input type="checkbox" name="not_inter" value="Not Interested"> </td> <td align="center" width="100"> Client<br><input type="checkbox" name="client" value="Client"> </td> <td align="center" width="100"> Demo<br><input type="checkbox" name="demo" value="Demo"> </td> <td align="center" width="100"> Not Contacted<br><input type="checkbox" name="notContacted" value="Not Contacted"> </td> <td align="center" width="100"> Call Back<br><input type="checkbox" name="callBack" value="Call Back"> </td> </tr> <tr> <td align="center" colspan="8"> <textarea name="comments" cols="70" rows="5"><?=$row['comments']?></textarea> </td> </tr> <tr> <td align="center" colspan="8"> <input type="submit" value="Submit Your Disposition"> </td> </tr> </table> </form> </td> </tr> </table> </p> <?php } ?> PHP is nice because you can drop in and out of it most anywhere. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.