EzwanAbid Posted December 22, 2012 Share Posted December 22, 2012 Why my '0' value didn't display in phpmyadmin? Example : The value I send from HTML is "05-201005-00018" but.. inside my phpmyadmin table the value turn into like this "05-201005-18" Here the picture of my database structure for student table : And here my PHP file where the value need to be inserted. StudentReg.html StudentReg.php Hope someone can help me here Link to comment https://forums.phpfreaks.com/topic/272282-phpmyadmin-didnt-display-0-value-in-database/ Share on other sites More sharing options...
kicken Posted December 22, 2012 Share Posted December 22, 2012 You need to enclose your '-' symbols in quotes. What you are doing right now is converting $StudentID2, $StudentID3, #ICNumber2, and $ICNumber4 to negative numbers, then concatenating them together. Eg, you're going from the string value "00018" to the numeric value 18, converting that to a negative (-18) then back to a string "-18" and concatenating them. Corrected it would look like this, with the - in quotes. $FStudentID=$StudentID1.'-'.$StudentID2.'-'.$StudentID3; Link to comment https://forums.phpfreaks.com/topic/272282-phpmyadmin-didnt-display-0-value-in-database/#findComment-1400870 Share on other sites More sharing options...
EzwanAbid Posted December 22, 2012 Author Share Posted December 22, 2012 Thank you for your reply kicken .. Thx it's working ! I never thought it would be a problem when I'm doing like that.. Thank you again kicken. My problem are SOLVED. Link to comment https://forums.phpfreaks.com/topic/272282-phpmyadmin-didnt-display-0-value-in-database/#findComment-1400893 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.