Username: Posted December 1, 2010 Share Posted December 1, 2010 $pastelink = "<br /><a href='view.php?paste=$lol&language=$language'>$name</a>"; mysql_query("INSERT INTO recent (url) VALUES ('$pastelink')"); That query won't run, however if I do this: $test = $_POST['name']; //$pastelink = "<br /><a href='view.php?paste=$lol&language=$language'>$name</a>"; mysql_query("INSERT INTO recent (url) VALUES ('$test')"); It will run, is this because of the single quotes in $pastelink? & If so, how can I fix it? Link to comment https://forums.phpfreaks.com/topic/220346-you-have-an-error-in-your-sql-syntax-check-the-manual-that-corresponds/ Share on other sites More sharing options...
dragon_sa Posted December 1, 2010 Share Posted December 1, 2010 have you tried like this $pastelink = '<br /><a href="view.php?paste=$lol&language=$language">$name</a>'; Link to comment https://forums.phpfreaks.com/topic/220346-you-have-an-error-in-your-sql-syntax-check-the-manual-that-corresponds/#findComment-1141795 Share on other sites More sharing options...
Username: Posted December 1, 2010 Author Share Posted December 1, 2010 have you tried like this $pastelink = '<br /><a href="view.php?paste=$lol&language=$language">$name</a>'; Appreciate the help, but already solved. Also that is wrong. Link to comment https://forums.phpfreaks.com/topic/220346-you-have-an-error-in-your-sql-syntax-check-the-manual-that-corresponds/#findComment-1141796 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.