Jump to content

Some understanding of a function


devilsvein

Recommended Posts

I've basically created a function which hosts a image and text obtained from my database.

 

Now this all works. The image shows and the correct information from the database is retrieved.

 

IF i put it in a function....the text from the database isn't retrieved.

 

the page that the function is on is as so:

 


<?php
require "corefolder/globe.php"; // global connection and data retrieval
require "corefolder/gamecore.php"; 

function Banner() {
echo "<div class=bannimage>
<img src='newbann.png' />
    <div class=text>
       <h3 style=margin-top:0px; margin-bottom:0px;>";

       echo "["; 
       echo $userid; 
       echo "]  "  ;

       </div>
 </div>";
 }

?>

Link to comment
https://forums.phpfreaks.com/topic/272668-some-understanding-of-a-function/
Share on other sites

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.