Jump to content

[SOLVED] can if statment and include work together?


Darkwoods

Recommended Posts

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>';  }

	 }
?>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.