jigsawsoul Posted August 10, 2009 Share Posted August 10, 2009 how do i add a space beween each $row <input id="customer" name="customer" size="30" type="text" value='.$row['title'] .''. $row['firstname'] .''. $row['surname'].' /> can't seem to get it to work Link to comment https://forums.phpfreaks.com/topic/169648-how-do-i-add-a-space/ Share on other sites More sharing options...
taquitosensei Posted August 10, 2009 Share Posted August 10, 2009 try this echo "<input id='customer' name='customer' size='30' type='text' value='".$row['title'] ." ". $row['firstname'] ." ". $row['surname']."' />"; Link to comment https://forums.phpfreaks.com/topic/169648-how-do-i-add-a-space/#findComment-894989 Share on other sites More sharing options...
jigsawsoul Posted August 10, 2009 Author Share Posted August 10, 2009 i can't write that as you said within here. this my full code. i can't work it out still. im new to php help.. $tablerows .= ' <form action="commissionrequest2.php?id='.$row['commission_id'].'" method="post"> <table> <tr> <td><b>Product(s) description:</b> <textarea input id="description" name="description" size="40" type="text" rows="4" cols="50"/></textarea></td> </tr> <tr> <td><b>Other comments:</b> <textarea input id="comments" name="comments" size="40" type="text" rows="4" cols="50" /></textarea></td> </tr> <td><b>Customer:</b><br /> <input id="customer" name="customer" size="30" type="text" value='.$row['title'] .' '. $row['firstname'] .' '. $row['surname'].' /></td> </tr> </tr> <td><b>Telephone:</b><br /> <input id="telephone" name="telephone" size="30" type="text" value='.$row['telephone'].' /></td> </tr> </tr> <td><b>Email:</b><br /> <input id="email" name="email" size="30" type="text" value='.$row['email'].' /></td> </tr> </table> <br /><br /> <input type="submit" value="Send Request" class="primary" /> </form> '; Link to comment https://forums.phpfreaks.com/topic/169648-how-do-i-add-a-space/#findComment-894991 Share on other sites More sharing options...
perrij3 Posted August 10, 2009 Share Posted August 10, 2009 It looks like you are missing quotes signs around your value tag in the input field. There also shouldn't be any periods before your first $row and at the very end behind $row['surname']. It should look something like this: <input id="customer" name="customer" size="30" type="text" value="<?php '$row['title'] . ' ' . $row['firstname'] . ' ' . $row['surname']'?>" /> Hope that helps. Link to comment https://forums.phpfreaks.com/topic/169648-how-do-i-add-a-space/#findComment-894999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.