How to get value on variable ?
-
hhtp://abc.com/12?ud=504132 ..........<? echo $_GET['ud'] ?>........; I want to do like this $us=<? echo $_GET['ud'] ?>; if($us==504132) { $us='Hi'; }else { $us='Bye'; } $echo 'I want to say you:'<? echo $_GET['us'] ?>; But it is not working what to do now ? <code></code><pre></pre>
-
hhtp://abc.com/12?ud=504132 ..........<? echo $_GET['ud'] ?>........; I want to do like this $us=<? echo $_GET['ud'] ?>; if($us==504132) { $us='Hi'; }else { $us='Bye'; } $echo 'I want to say you:'<? echo $_GET['us'] ?>; But it is not working what to do now ? <code></code><pre></pre>
udch wrote:
$us=<? echo $_GET['ud'] ?>;
Why are you opening new PHP tags when you are already in some?
<? $us = **<?**
... It's just not necessary. Check ifud
is set, otherwise it is0
.$us = isset($_GET['ud']) ? $_GET['ud'] : 0 ;
udch wrote:
$echo 'I want to say you:'<? echo $_GET['us'] ?>;
$echo
is just wrong; echo is not a variable but a language construct. Read the documentation[^] to learn more. And again with the opening of more PHP tags.echo '$ud = ' . $us;
If at first you don't succeed, you're not Chuck Norris.
-
udch wrote:
$us=<? echo $_GET['ud'] ?>;
Why are you opening new PHP tags when you are already in some?
<? $us = **<?**
... It's just not necessary. Check ifud
is set, otherwise it is0
.$us = isset($_GET['ud']) ? $_GET['ud'] : 0 ;
udch wrote:
$echo 'I want to say you:'<? echo $_GET['us'] ?>;
$echo
is just wrong; echo is not a variable but a language construct. Read the documentation[^] to learn more. And again with the opening of more PHP tags.echo '$ud = ' . $us;
If at first you don't succeed, you're not Chuck Norris.
I am getting value from an url Like http://abc.com/data.php?ud=567878 Now i am passing this value to an iframe of HTML exmple:- <Body> <Html> <iframe frameborder=0 src="http://www.es.com/ifr?url=http://anc.com/wow.xml&amp;up\_k1=<? echo $_GET['ud'] ?>&up_interval=60&synd=open&w=362&h=350&" width=284 height=120 scrolling="no"></iframe> </Body> </Html> I have to write value like up_k1=567878 and it can not take value from any variable. My problem is and i want to do is checking value like if($ud==567878) { $ud='love all humans'; } and then write it in iframe like up_k1=love all humans Now tell me brother can i do this ?
-
I am getting value from an url Like http://abc.com/data.php?ud=567878 Now i am passing this value to an iframe of HTML exmple:- <Body> <Html> <iframe frameborder=0 src="http://www.es.com/ifr?url=http://anc.com/wow.xml&amp;up\_k1=<? echo $_GET['ud'] ?>&up_interval=60&synd=open&w=362&h=350&" width=284 height=120 scrolling="no"></iframe> </Body> </Html> I have to write value like up_k1=567878 and it can not take value from any variable. My problem is and i want to do is checking value like if($ud==567878) { $ud='love all humans'; } and then write it in iframe like up_k1=love all humans Now tell me brother can i do this ?
-
Please engage your brain.
<? echo $ud ?>
instead of<? echo $_GET['ud'] ?>
If at first you don't succeed, you're not Chuck Norris.