Jump to content

Recommended Posts

why am I getting a undefined function error?  The function contactInfo names are spelled the same, right? 

 

<?php
function menu() {
echo <<<HEREDOC
	<ul id = "navBar">
		<li class = "menuChoice"><a href="homepage.php">Home</a></li>  
		<li class = "menuChoice"><a href="benefits.php">Benefits</a></li>  
		<li class = "menuChoice"><a href="portfolio.php">Portfolio</a></li>  	
		<li class = "menuChoice"><a href="contact.php">Contact</a>			
	</ul>
HEREDOC;
}
function logo()  {
echo <<<HEREDOC
	<hgroup>
		<h1>Site Services Unlimited</h1>
	</hgroup>
HEREDOC;	
}
function contactInfo() {
echo <<<HEREDOC
	808 Melching Drive Ossian, IN  46777 <br>
(260)-273-2708 <br>
<a href="mailto:mindy@siteservicesunlimited.com">Contact Us</a>
HEREDOC;
}
?>

 

<?php
require_once("functions.php");
?><!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
    <title>Untitled Document</title>
    <!--meta description -->
    <link rel="stylesheet" href="siteServices.css">
    <!--[if It IE 9]>
    <script src="http://html5shiv.googlecode-.com/svn/trunk/html5.js">
    </script>
    <![endif]--> 
<script type="text/javascript" language="javascript">
var slideArray = new Array()
slideArray[0]= "Web Design";
slideArray[1]= "Website Maintenance";
slideArray[2]= "Article Writing"; 
slideArray[3]= "Internet Research"; 
slideArray[4]=  "Blogging"; 
function textSlideShow()
{
var total_slides;
total_slides=Math.floor(Math.random()*slideArray.length)
document.getElementById('div_display').innerHTML=slideArray[total_slides];
setTimeout("textSlideShow()",800);
}
</script>
</head>

<body>
<div id="mainContent">
<header>
   		<?php logo(); ?>
    	<nav>
        	<?php menu(); ?>
        </nav>
     </header>
<table id = "skills">
<tr>
<td>
<div id="div_display"><script type="text/javascript" language="javascript">textSlideShow();</script></div>
</td>
</tr>
</table>
     <footer>
	<?php  contactInfo(); ?>
     </footer>
</div>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/264827-undefined-function-error/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.