ShaolinF Posted January 24, 2008 Share Posted January 24, 2008 Hey Guys This INSERT code doesnt work: $insert = mysql_query("INSERT INTO users VALUES ('', '$_SESSION['NAME']', '$_SESSION['CONTACTNO']', '$_SESSION['EMAILADD']', '$_SESSION['GENDER']')"); Link to comment https://forums.phpfreaks.com/topic/87640-solved-insert-code/ Share on other sites More sharing options...
revraz Posted January 24, 2008 Share Posted January 24, 2008 You're right, it wouldnt Link to comment https://forums.phpfreaks.com/topic/87640-solved-insert-code/#findComment-448244 Share on other sites More sharing options...
ShaolinF Posted January 24, 2008 Author Share Posted January 24, 2008 So what do I need to change Link to comment https://forums.phpfreaks.com/topic/87640-solved-insert-code/#findComment-448247 Share on other sites More sharing options...
revraz Posted January 24, 2008 Share Posted January 24, 2008 Change your single quotes around your sessions to { } brackets Link to comment https://forums.phpfreaks.com/topic/87640-solved-insert-code/#findComment-448256 Share on other sites More sharing options...
jorgep Posted January 24, 2008 Share Posted January 24, 2008 :S that is not enough information, what error are you getting? did you activated the session variables? whats is your final query???? Edited: Or just scape the string... $insert = mysql_query("INSERT INTO users VALUES ('', '".$_SESSION['NAME']."', '".$_SESSION['CONTACTNO']."', '".$_SESSION['EMAILADD']."', '".$_SESSION['GENDER']."')"); Link to comment https://forums.phpfreaks.com/topic/87640-solved-insert-code/#findComment-448257 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.