Aaron4osu Posted December 24, 2011 Share Posted December 24, 2011 I'm getting the following error when the $query = mysql_query line runs: Parse error: syntax error, unexpected T_VARIABLE $vidtitle = strip_tags(trim($_POST['vidtitle'])); $viddesc = strip_tags(trim($_POST['viddesc'])); $vidtags = strip_tags(trim($_POST['vidtags'])); $vidurl = strip_tags(trim($_POST['vidurl'])); // get current username $username = $_SESSION['Username'] // register user $query = mysql_query("INSERT INTO haas12_test.videos (vidtitle, viddesc, vidtags, vidurl, username) VALUES('".$vidtitle."', '".$viddesc."', '".$vidtags."', '".$vidurl."', '".$username."')"); it worked fine before I added the username variables. Quote Link to comment https://forums.phpfreaks.com/topic/253801-help-with-a-parse-error/ Share on other sites More sharing options...
AGuyWithAthing Posted December 24, 2011 Share Posted December 24, 2011 $username = $_SESSION['Username'] Simple one $username = $_SESSION['Username'] ; //<<<<<< Semicolon Quote Link to comment https://forums.phpfreaks.com/topic/253801-help-with-a-parse-error/#findComment-1301160 Share on other sites More sharing options...
Aaron4osu Posted December 24, 2011 Author Share Posted December 24, 2011 I always forget to look at the line above the error. Thanks!!! Quote Link to comment https://forums.phpfreaks.com/topic/253801-help-with-a-parse-error/#findComment-1301162 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.