hi Im trying to get get some stuff out of database using php and sql statement. I don't know for some reason its reading from database but as soon as it encounters space it stops reading. I am displying the output in a text box. please tell me how can i display the whole thing on the page, not only the first word.
Gaagool
maybe putting including a code snippet would help us help you.
By text box, you mean <input type=text ... don't you?
Try adding quotes around the value like this:
echo "<input type=text name=whatevername value='$variable'>";
hey guys! I don't think putting single '' worked. here is part of my code if it helps :
if (!empty($conResult['company_name'])) echo "<input type=text name=compName size=50 maxlength=45 value=".$conResult['company_name'].">"; else echo "<input type=text name=compName size=50 maxlength=45>";
thanx guys the quotes worked
echo "<input type=text name=compName size=50 maxlength=45 value='".$conResult['company_name']."'>";
You didn't add the single quotes where they were needed. Copy this code.