ambo Posted September 24, 2008 Share Posted September 24, 2008 $sql="INSERT INTO events (id,start,end,type) VALUES ('$name','$email')"; Are the thing highlighted in red have to be in the same order as the ones highlighted in green and are the ones in red are they actually written as the variable name in the table like id my variable in the table is event_id ould i have to add that whole event_id Link to comment https://forums.phpfreaks.com/topic/125659-help-inserting-to-table/ Share on other sites More sharing options...
aebstract Posted September 24, 2008 Share Posted September 24, 2008 Yes they need to be in matching order and you also have to have the same number of variables in the green as you have options in the red. You will have to spell out every column exactly as it matches your table. Link to comment https://forums.phpfreaks.com/topic/125659-help-inserting-to-table/#findComment-649709 Share on other sites More sharing options...
ambo Posted September 24, 2008 Author Share Posted September 24, 2008 ok so id would have to be event_id as its labeled in the table thanks Link to comment https://forums.phpfreaks.com/topic/125659-help-inserting-to-table/#findComment-649710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.