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? Link to comment https://forums.phpfreaks.com/topic/94194-parse-error-syntax-error-unexpected-t_include/ 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 Link to comment https://forums.phpfreaks.com/topic/94194-parse-error-syntax-error-unexpected-t_include/#findComment-482466 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. Link to comment https://forums.phpfreaks.com/topic/94194-parse-error-syntax-error-unexpected-t_include/#findComment-482468 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. Link to comment https://forums.phpfreaks.com/topic/94194-parse-error-syntax-error-unexpected-t_include/#findComment-482474 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.