eleven0 Posted March 4, 2008 Share Posted March 4, 2008 <?php include 'config2.php'; include 'opendb.php'; $query = "SELECT * FROM xxxx WHERE ID_TOPIC='237'"; $result = mysql_query($query) or die(mysql_error()); // keeps getting the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table $row['body']; $query="INSERT INTO members (name, rank, pos, tod) VALUES ('".$_POST['name']."', '".$_POST['rank']."', '".$_POST['pos']."', '".$row['body']."')"; mysql_query($query) or die('Error, insert query failed'); echo "Member added"; ?> It gets the inputs from the another page using forms. now, i'm getting this problem Parse error: syntax error, unexpected T_INCLUDE on line 7. What am i doing wrong? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 4, 2008 Share Posted March 4, 2008 Missing semi-colon on this line. <?php $pos=$_POST['pos'] ?> The original post was edited as I was submitting my answer. Ken Quote Link to comment Share on other sites More sharing options...
eleven0 Posted March 4, 2008 Author Share Posted March 4, 2008 Parse error: syntax error, unexpected T_INCLUDE in ******** on line 7. still the same error. Quote Link to comment Share on other sites More sharing options...
haku Posted March 4, 2008 Share Posted March 4, 2008 You must not be showing us your whole code because there isn't an include on line 7, and that error is telling us there is. Quote Link to comment 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.