|
-
May 8th, 2002, 02:49 AM
#1
Thread Starter
Fanatic Member
variables are screwed (urgent)
I have a command line for my page like this: http://127.0.0.1/variables.php?something=elooo
but the code doesnt recognise the $something variable. it gives this error:
Notice: Undefined variable: something in c:\windows\desktop\files\wwwroot\variables.php on line 9
is this a stuffed up setting ? or something I'm doing wrong ?
this is the code in the page :
PHP Code:
<html>
<body>
<b>Variables</b>
<?PHP
//IF (isset($something))
ECHO $something;
?>
</body>
</html>
-
May 8th, 2002, 07:29 AM
#2
Lively Member
What is the exact code at line 9 ?
Is this it ? "ECHO $something;"
Otherwise just try this on thepage.
PHP Code:
<html>
<body>
<b>Variables</b>
<?PHP
$something= "1234567";
ECHO $something;
?>
</body>
</html>
Test that and see if it echoes it....
"Against All Odds"

-
May 8th, 2002, 07:59 AM
#3
what version of php are you on? and is registar_globals turned off?
-
May 8th, 2002, 08:03 AM
#4
you can turn the warning off. just uncomment this or add this to the php.ini file.
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors except for notices
;
error_reporting = E_ALL & ~E_NOTICE
-
May 11th, 2002, 03:54 AM
#5
Thread Starter
Fanatic Member
it was that "registar_globals" was turned off, thanx scoutt
-
May 11th, 2002, 01:18 PM
#6
it is recommended to leave it off for security reasons. alll version after 4.2 will have it off.
-
May 11th, 2002, 09:47 PM
#7
Thread Starter
Fanatic Member
lol, yeh, cos i had a previous version installed before this one that could explain the problems .
thanx again dude
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|