including itself?

  • Nem
  • Guru
  • Guru
  • Nem
  • Posts: 1243
  • Loc: UK

Post 3+ Months Ago

Im creating an install script to install a cms system.

I created a form and a header. I added functions in my script, ie)

$header = "i added header javascript here";


$form = "form javascript here"... in the form script i had...

$sqluser, $sqlpass.... etc... so that i can connect to the database using the fields entered. After connecting i was planning on making the script open up a file called "connect.php" and update the contents in there so it will connect on all other pages.

But the problem is... after i added a kind of function... ie) $header. how do i get it to show?

i tried: function = $header; but this does not work.

The main thing is, i want to keep it all organised so all error messages and forms will stay at the top of the script, then underneath i will put them in place using small tags like "$errorpw".

Can someone please guide me?
  • Veter
  • Novice
  • Novice
  • User avatar
  • Posts: 20

Post 3+ Months Ago

The $header is not a function here. Its a variable.

If you want to show it on the page you have to use:
Code: [ Select ]
echo $header;

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 76 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.