PHP variables are not getting picked up

Status
Not open for further replies.

itwizard

New Member
Messages
4
Reaction score
0
Points
0
Hi just wondering why my PHP variables wont pickup? Coding is correct...
 

adamparkzer

On Extended Leave
Messages
3,745
Reaction score
81
Points
0
Hi just wondering why my PHP variables wont pickup? Coding is correct...

Hi itwizard,

Could you copy and paste the code here so we can look into why your variables aren't being detected?

- Adam
 

Jarryd

Community Advocate
Community Support
Messages
5,534
Reaction score
43
Points
48
Need to be more specific, which variables and what errors are you getting?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
If you are talking about a submitted form with a field named "myName", and you expect there to be a variable named $myName with the submitted value, then, it doesn't work on x10hosting (or on a lot of sites).
register_globals is turned off.
You have to use $_POST[ 'myName' ] ( or $_GET['myName'] if GET was used) to retrieve the submitted value.
 

itwizard

New Member
Messages
4
Reaction score
0
Points
0
if($s=="company"){
echo "GAMERS EYE - Professional Gaming Templates // Company";
}

coded in my <header> of index.php

when you view http://itwizard.us?s=company Company doesnt show up in the title tag like it should
Edit:
oh wow I figured it out. I switched the $s == "blah" to $2 = "blah"

I could have sworn that you use double == but I havent used php in over a year and am a bit new :/

thanks everyone
 
Last edited:

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
if($s=="company"){
echo "GAMERS EYE - Professional Gaming Templates // Company";
}

coded in my <header> of index.php

when you view http://itwizard.us?s=company Company doesnt show up in the title tag like it should
EDIT: IGNORE THIS, turns out I was wrong based on the edit you just posted >_<

EDIT 2: Blah, wish I had left my original post, it -was- register_globals >_<
 
Last edited:

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
as this is now resolved - I have closed this threwad.

If you need further help, feel free to reopen/create a new thread
 
Status
Not open for further replies.
Top