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']')"); Quote 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 Quote 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 Quote 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 Quote 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']."')"); Quote Link to comment https://forums.phpfreaks.com/topic/87640-solved-insert-code/#findComment-448257 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.