phppaper Posted April 2, 2011 Share Posted April 2, 2011 Hello all I am getting an error Parse error: syntax error, unexpected T_VARIABLE with this line: $isql = oci_parse($conn, 'INSERT INTO "useridA" VALUES ('$userid')'); Any through? Thanks! Link to comment https://forums.phpfreaks.com/topic/232492-syntax-error-unexpected-t_variable/ Share on other sites More sharing options...
RichardRotterdam Posted April 2, 2011 Share Posted April 2, 2011 Some syntax highlighting should make it obvious enough $isql = oci_parse($conn, 'INSERT INTO "useridA" VALUES ('$userid')'); You're forgetting the dots before and after $userid Link to comment https://forums.phpfreaks.com/topic/232492-syntax-error-unexpected-t_variable/#findComment-1195850 Share on other sites More sharing options...
JasonLewis Posted April 2, 2011 Share Posted April 2, 2011 You have an unexpected variable. Check the quotes you used to start the string and the quotes around your variable $userid. Link to comment https://forums.phpfreaks.com/topic/232492-syntax-error-unexpected-t_variable/#findComment-1195851 Share on other sites More sharing options...
phppaper Posted April 2, 2011 Author Share Posted April 2, 2011 still the same error, any through? Link to comment https://forums.phpfreaks.com/topic/232492-syntax-error-unexpected-t_variable/#findComment-1195853 Share on other sites More sharing options...
RichardRotterdam Posted April 2, 2011 Share Posted April 2, 2011 What have you tried which still causes a problem? Link to comment https://forums.phpfreaks.com/topic/232492-syntax-error-unexpected-t_variable/#findComment-1195856 Share on other sites More sharing options...
kenrbnsn Posted April 2, 2011 Share Posted April 2, 2011 You can try reversing the single and double quotes: <?php $isql = oci_parse($conn, "INSERT INTO 'useridA' VALUES ('$userid')"); ?> Ken Link to comment https://forums.phpfreaks.com/topic/232492-syntax-error-unexpected-t_variable/#findComment-1195891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.