Current location: Hot Scripts Forums » Programming Languages » PHP » HELP... Global declaration.


HELP... Global declaration.

Reply
  #1 (permalink)  
Old 11-23-04, 03:31 AM
jozin jozin is offline
Newbie Coder
 
Join Date: Oct 2004
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
HELP... Global declaration.

Hi,

In my header.inc template, I declared:

<?php
global $INDEXTYPE;
?>

in my Registration form, I passed a value to my global variable:

<?php
$page_title = 'Welcome!';
include ('./header.inc');
$GLOBALS("INDEXTYPE")="AA";
?>

I got this error:

parse error, unexpected '=' in C:\web\Apds\Registration_form.php on line 6

This is line 6:
$GLOBALS("INDEXTYPE")="AA";


What is wrong with my code?

jozin
Reply With Quote
  #2 (permalink)  
Old 11-23-04, 04:06 AM
James Talbot James Talbot is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Try :

PHP Code:



$GLOBALS
['INDEXTYPE'] == "AA"
Im not an expert but thats how i would write it.....
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirection back to a page from form submit DAL Perl 11 03-21-05 02:45 PM
PHP Error Fairnie PHP 8 06-26-04 07:15 AM
sharing global variables accross pages davidklonski JavaScript 1 05-24-04 02:06 AM
global variables in external file Dr-Leech JavaScript 1 05-15-04 02:28 PM
Formmail Script Fix - Cant display multiple list selections.. zamen PHP 3 05-02-04 09:59 AM


All times are GMT -5. The time now is 05:16 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.