473,396 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

problem to get data from a form (method=get)

i am using redhat8 with default php installed, the problem i am facing
is that:

#test.php
<?php
echo $test_value;
?>

localhost/test.php?test_value=abc

whatever values i try, php can't get my values passed by get or direct
url passing. do you have any ideas about that problem? thanks :)
Jul 17 '05 #1
11 1648
On Mon, 13 Sep 2004 02:57:11 +1000, linux newbie
<li****************@yahoo.com> wrote:
i am using redhat8 with default php installed, the problem i am facing
is that:

#test.php
<?php
echo $test_value;
?>

localhost/test.php?test_value=abc

whatever values i try, php can't get my values passed by get or direct
url passing. do you have any ideas about that problem? thanks :)

PEBKAC. RTFM!

Regards,

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/
Jul 17 '05 #2
"linux newbie" <li****************@yahoo.com> wrote in message
news:41***********************@news.optusnet.com.a u...
i am using redhat8 with default php installed, the problem i am facing
is that:

#test.php
<?php
echo $test_value;
?>

localhost/test.php?test_value=abc

whatever values i try, php can't get my values passed by get or direct
url passing. do you have any ideas about that problem? thanks :)


Use $_GET['test_value'] instead of $test_value. Read the section of the PHP
manual on register_globals.
Jul 17 '05 #3
Ian.H wrote:
PEBKAC. RTFM!


Hehe.

--
Jock
Jul 17 '05 #4
linux newbie wrote:
#test.php
<?php
echo $test_value;
?>

localhost/test.php?test_value=abc

whatever values i try, php can't get my values passed by get or direct
url passing. do you have any ideas about that problem? thanks :)


ARGH! This question comes up every second day. Why do you all ignore the
manual?

=> http://www.php.net/manual/en/languag...predefined.php

Your variable will be in $_GET['test_value'].

To avoid warnings from PHP, your code should look like this

<?php
echo isset($_GET['test_value']) ? $_GET['test_value'] : '';
?>

or that:

<?php
if (isset($_GET['test_value'])) {
echo $_GET['test_value'];
}
?>
Matthias
Jul 17 '05 #5
> ARGH! This question comes up every second day.

Very true.

Someone should post a list of answers to common questions and title the post
"LOOK HERE BEFORE YOU ASK ANY QUESTIONS." Then again, if people can't check
the manual, they probably won't look at that post either...

- JP
Jul 17 '05 #6
kingofkolt wrote:
ARGH! This question comes up every second day.

Very true.

Someone should post a list of answers to common questions and title the post
"LOOK HERE BEFORE YOU ASK ANY QUESTIONS." Then again, if people can't check
the manual, they probably won't look at that post either...

- JP


thank you so much :)
but why it works on some redhat linux? without using
$_GET['variable_name']???
Jul 17 '05 #7
Matthias Esken wrote:
linux newbie wrote:

#test.php
<?php
echo $test_value;
?>

localhost/test.php?test_value=abc

whatever values i try, php can't get my values passed by get or direct
url passing. do you have any ideas about that problem? thanks :)

ARGH! This question comes up every second day. Why do you all ignore the
manual?

=> http://www.php.net/manual/en/languag...predefined.php

Your variable will be in $_GET['test_value'].

To avoid warnings from PHP, your code should look like this

<?php
echo isset($_GET['test_value']) ? $_GET['test_value'] : '';
?>

or that:

<?php
if (isset($_GET['test_value'])) {
echo $_GET['test_value'];
}
?>
Matthias

thank you so much :)
but why it works on some redhat linux? without using
$_GET['variable_name']???
Jul 17 '05 #8
On Mon, 13 Sep 2004 23:53:01 +1000, linux newbie
<li****************@yahoo.com> wrote:
Matthias Esken wrote:
linux newbie wrote:

#test.php
<?php
echo $test_value;
?>

localhost/test.php?test_value=abc

whatever values i try, php can't get my values passed by get or direct
url passing. do you have any ideas about that problem? thanks :)

ARGH! This question comes up every second day. Why do you all ignore the
manual?

=> http://www.php.net/manual/en/languag...predefined.php

Your variable will be in $_GET['test_value'].

To avoid warnings from PHP, your code should look like this

<?php
echo isset($_GET['test_value']) ? $_GET['test_value'] : '';
?>

or that:

<?php
if (isset($_GET['test_value'])) {
echo $_GET['test_value'];
}
?>
Matthias

thank you so much :)
but why it works on some redhat linux? without using
$_GET['variable_name']???

LOOK ABOVE!! There's even a damn manual reference!

Quality of PHP users here is really going downhill =(

Here.. plain and simple...
R E A D
T H E
F U C K I N'
M A N U A L
As you seem too stupid to understand an acronym.

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/
Jul 17 '05 #9
On Mon, 13 Sep 2004 23:52:00 +1000, linux newbie
<li****************@yahoo.com> wrote:
kingofkolt wrote:
ARGH! This question comes up every second day.

Very true.

Someone should post a list of answers to common questions and title the post
"LOOK HERE BEFORE YOU ASK ANY QUESTIONS." Then again, if people can't check
the manual, they probably won't look at that post either...

- JP


thank you so much :)
but why it works on some redhat linux? without using
$_GET['variable_name']???

There rests the case for the defense m'lord.

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/
Jul 17 '05 #10
linux newbie wrote:
Matthias Esken wrote:
ARGH! This question comes up every second day. Why do you all ignore the
manual?

=> http://www.php.net/manual/en/languag...predefined.php


thank you so much :)
but why it works on some redhat linux? without using
$_GET['variable_name']???


I'm still patient.

Read http://www.php.net/manual/en/languag...predefined.php.
Read the box with the fat header "Warning".

If you ask this question again, please add your credit card number.
You'll get charged by the "PHP Manual Read Out Service".

Matthias
Jul 17 '05 #11
"Ian.H" <ia*@WINDOZEdigiserv.net> wrote in message
news:cq********************************@4ax.com...
R E A D
T H E
F U C K I N'
M A N U A L
As you seem too stupid to understand an acronym.

Ian

--
Ian.H
digiServ Network
London, UK
http://digiserv.net/


ouch
Jul 17 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Krista | last post by:
Hi everybody, I think my confi has some problems. Can you guys help me to see what is going on? i install Apache2.0.48 and Php4.3.4 in WinXP. I add some codes in httpd(inside apache...
3
by: Gert Jan Wiersema | last post by:
Hello all, I'm trying to give users a form in which they can check all 52 weeks of the year. This is done in a $weeks_array thingy. Unfortunately it seems that only 46 of the 52 values (and some...
3
by: Lars Plessmann | last post by:
Problem: I try to store data in a objects field and read it out again. Sounds easy, yeah. But its a bit tricky here.... ;-) This is the class Customer.php with some setter and getter functions...
1
by: idiot | last post by:
public DirectoryEntry Find(string, string) method get Exception from HRESULT: 0x80005008 public DirectoryEntry Find(string); method get NullReferenceException source code : string strSchema =...
1
by: Eddy Ilg | last post by:
I'm having problems with a python cgi script. The script just won't read any POST data. Forms with GET data work fine. Here's the script: #!/usr/bin/python import sys import os import cgi
0
by: danny.agle | last post by:
I've been trying to resolve an issue with a user control not maintaining its state on a web page after a postback. I reviewed http://msdn2.microsoft.com/en-us/library/1whwt1k7.aspx and am...
4
by: mangesh | last post by:
do static method get inherited ? if no why ? Regards Mangesh
5
by: Chris | last post by:
I have a meetings section I'm developing on our intranet. Using PHP/MySQL. Meeting info and Meeting docs reside on 2 related tables in the db. Users may want to upload anywhere from 1 to 10 or...
6
by: zxo102 | last post by:
Hi, I am using Queue from python2.4. Here is what happen to me: import Queue b = Queue.Queue(0) b.put(9999) b.get() # this is ok, it pops out 9999 b.get() # this one does not return...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.