gple Posted June 30, 2008 Share Posted June 30, 2008 mysql_query("INSERT INTO tables (user_id) VALUES ('$username')"); this coding is not inserting the variable that is being passed. Instead it is placing a 0. Link to comment https://forums.phpfreaks.com/topic/112586-help-with-code/ Share on other sites More sharing options...
LooieENG Posted June 30, 2008 Share Posted June 30, 2008 Have you checked $username is as expected (echo it) Link to comment https://forums.phpfreaks.com/topic/112586-help-with-code/#findComment-578191 Share on other sites More sharing options...
gple Posted June 30, 2008 Author Share Posted June 30, 2008 yes echoes as expected. Link to comment https://forums.phpfreaks.com/topic/112586-help-with-code/#findComment-578193 Share on other sites More sharing options...
LooieENG Posted June 30, 2008 Share Posted June 30, 2008 Okay, are you sure the column is the right type for a username? user_id sounds like it would be an auto-incrementing int column Link to comment https://forums.phpfreaks.com/topic/112586-help-with-code/#findComment-578194 Share on other sites More sharing options...
gple Posted June 30, 2008 Author Share Posted June 30, 2008 yeah I got it. thanks. Link to comment https://forums.phpfreaks.com/topic/112586-help-with-code/#findComment-578199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.