Darkwoods Posted October 27, 2008 Share Posted October 27, 2008 im trying to make an if then include but it is not working my question is can if and include work together? <?php $id = $_GET['id']; $result = mysql_query("SELECT * FROM pages WHERE id='$id' ",$connect); while($row = mysql_fetch_assoc($result)) { echo '<div class="'; echo $row['lang']; echo '">'; echo '<div>'; echo $row['content']; echo '</div>'; echo '</div>'; if($id == '2') { echo '<div>'; include "inc/contactus.php" echo '</div>'; } } ?> Link to comment https://forums.phpfreaks.com/topic/130342-solved-can-if-statment-and-include-work-together/ Share on other sites More sharing options...
Darkwoods Posted October 27, 2008 Author Share Posted October 27, 2008 oops i can see the mistake now! i never ended it lol i always do this dumb mistake sorry include "inc/contactus.php"; Link to comment https://forums.phpfreaks.com/topic/130342-solved-can-if-statment-and-include-work-together/#findComment-676019 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.