kevincro Posted October 15, 2007 Share Posted October 15, 2007 My PHP script is not saving the entire value in MySQL. I'm not sure if the problem is in my script or in my database setup, which is why I posted this in both forums. I apologize for the double post. Basically what's going on is, I passed some variables from one page and on to my form page. When I submit the new form, the data is saved in the database up until the first space. Everything after the first space is lost. I'm not sure what I've done wrong. thanks in advance for any help with this matter. kevincro Quote Link to comment https://forums.phpfreaks.com/topic/73288-solved-my-script-wont-save-the-entire-input/ Share on other sites More sharing options...
jd2007 Posted October 15, 2007 Share Posted October 15, 2007 can i see the sql table setup code and the php code ? Quote Link to comment https://forums.phpfreaks.com/topic/73288-solved-my-script-wont-save-the-entire-input/#findComment-369764 Share on other sites More sharing options...
kevincro Posted October 15, 2007 Author Share Posted October 15, 2007 This is one of my inputs on the form page. Everything is displayed perfectly on this page. <TR> <TD width=110><B>Name:</B></TD> <TD><INPUT type=hidden style="WIDTH: 180px" name=Name value=<?PHP echo $row['Name'] ?> </TD><?PHP echo $row['Name']?> </TR> I created the MySQL table manually, but each column in the table is varchar(255), latin1_swedish_ci collation, and each is set to null. Quote Link to comment https://forums.phpfreaks.com/topic/73288-solved-my-script-wont-save-the-entire-input/#findComment-369771 Share on other sites More sharing options...
Barand Posted October 15, 2007 Share Posted October 15, 2007 Get into the habit of quoting attribute values. In particular, value="<?PHP echo $row['Name'] ?>" BTW, you haven't close out that input tag - missing ">" Quote Link to comment https://forums.phpfreaks.com/topic/73288-solved-my-script-wont-save-the-entire-input/#findComment-369779 Share on other sites More sharing options...
Barand Posted October 15, 2007 Share Posted October 15, 2007 Don't double post. I have deleted your post of this topic from the MySQL forum Quote Link to comment https://forums.phpfreaks.com/topic/73288-solved-my-script-wont-save-the-entire-input/#findComment-369840 Share on other sites More sharing options...
kevincro Posted October 15, 2007 Author Share Posted October 15, 2007 Putting that in quotes fixed the problem. Thanks a lot, and again I'm sorry for the double post. Quote Link to comment https://forums.phpfreaks.com/topic/73288-solved-my-script-wont-save-the-entire-input/#findComment-369880 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.