sphinx Posted September 6, 2011 Share Posted September 6, 2011 For some reason, this include function is putting a "1" on my website, why? <?php $link ='index.php?sent'; if (!isset($_GET['sent'])) echo include('contact.php'); ?> Thanks! Link to comment https://forums.phpfreaks.com/topic/246576-this-code-is-outputting-a-1-on-my-site/ Share on other sites More sharing options...
WebStyles Posted September 6, 2011 Share Posted September 6, 2011 what's in contact.php ? Link to comment https://forums.phpfreaks.com/topic/246576-this-code-is-outputting-a-1-on-my-site/#findComment-1266187 Share on other sites More sharing options...
Pikachu2000 Posted September 6, 2011 Share Posted September 6, 2011 include returns a 1 on success, and you're echoing it. Simply: include 'contact.php'; is all that's needed. Link to comment https://forums.phpfreaks.com/topic/246576-this-code-is-outputting-a-1-on-my-site/#findComment-1266189 Share on other sites More sharing options...
dougjohnson Posted September 6, 2011 Share Posted September 6, 2011 Then do any "echoing" inside the contact.php include. Link to comment https://forums.phpfreaks.com/topic/246576-this-code-is-outputting-a-1-on-my-site/#findComment-1266190 Share on other sites More sharing options...
sphinx Posted September 6, 2011 Author Share Posted September 6, 2011 Thanks!! Link to comment https://forums.phpfreaks.com/topic/246576-this-code-is-outputting-a-1-on-my-site/#findComment-1266192 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.