473,395 Members | 1,949 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,395 software developers and data experts.

what has Hostway done to PHP? Form variables suddenly undefined in previously working forms

Hostway swears they didn't do anything but mysterious breakdowns have made
us do the following test:
<?
if ($_POST) {
echo "<h3>name is defined as $name</h3>";
print_r($_POST);
exit;
}
?>

<form name="form1" method="post" action="test.php">
<input name="name" type="text" id="name">
<input type="submit" name="Submit" value="Submit">
</form>
This produces:
name is defined as
Array ( [name] => fellow [Submit] => Submit )

So $_POST has the defined var but $name is no longer automatically defined.
What did they do to the configuration?

TIA!

jg
Jul 16 '05 #1
4 3640
Andy Hassall wrote:
On Wed, 27 Aug 2003 14:48:46 -0500, "jerrygarciuh"
<de*****@no.spam.nolaflash.com> wrote:
echo "<h3>name is defined as $name</h3>";


Search for 'register_globals'.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)


Sod it, I'll do a Wiki at the weekend!

Matt
Jul 16 '05 #2
"jerrygarciuh" <de*****@no.spam.nolaflash.com> schrieb:
So $_POST has the defined var but $name is no longer automatically defined.
What did they do to the configuration?


register_globals = off

Regards,
Matthias
Jul 16 '05 #3
Yep! The jerks had stuck a php.ini in our cgi-bin with one line:
auto_register_globals = off
Arrrrrrrrrrrrgh!! Lost money. Feh!
Thanks all! Much obliged!
jg


"jerrygarciuh" <de*****@no.spam.nolaflash.com> wrote in message
news:vW73b.25806$xf.18726@lakeread06...
Hostway swears they didn't do anything but mysterious breakdowns have made
us do the following test:
<?
if ($_POST) {
echo "<h3>name is defined as $name</h3>";
print_r($_POST);
exit;
}
?>

<form name="form1" method="post" action="test.php">
<input name="name" type="text" id="name">
<input type="submit" name="Submit" value="Submit">
</form>
This produces:
name is defined as
Array ( [name] => fellow [Submit] => Submit )

So $_POST has the defined var but $name is no longer automatically defined. What did they do to the configuration?

TIA!

jg

Jul 16 '05 #4

"jerrygarciuh" <de*****@no.spam.nolaflash.com> wrote in message
news:vW73b.25806$xf.18726@lakeread06...
Hostway swears they didn't do anything but mysterious breakdowns have made
us do the following test:
<?
if ($_POST) {
echo "<h3>name is defined as $name</h3>";
try echo "<h3>name is defined as $_POST["name"]</h3>";

I would say your webhost has just upgraded their version of PHP, to one
which has register_globals set to 'off;' by default. To access form
variables you can use the $_POST and $_GET arrays:

POST method - $_POST["form_element_name"]

GET method - $_GET["forn_element_name"]
<form name="form1" method="post" action="test.php">
<input name="name" type="text" id="name">
<input type="submit" name="Submit" value="Submit">
</form>
jg

Jul 16 '05 #5

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

Similar topics

1
by: Jenkins | last post by:
I've loaded various thoughts I've collected into mysql. I want to write an app, all in one file, that has the following features: 1. On initial entry, selects and displays the thoughts ( might...
44
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there...
8
by: Sergio Otoya | last post by:
Hi all, I need to add an input hidden field to an existing form (post). I have tried a couple things like adding the '<INPUT type=hidden name=idSelectedURL value=http://server/documents>' to...
5
by: NB | last post by:
Hi In my 2 years with Access I have never seen this, now it makes me mad In an unbound form frmTH I have a frmList which is a continous form In its on current event, I synch 4 of its fields...
140
by: Oliver Brausch | last post by:
Hello, have you ever heard about this MS-visual c compiler bug? look at the small prog: static int x=0; int bit32() { return ++x; }
6
by: timster | last post by:
>From Microsoft Office 2000/Visual Basic Programmer's Guide Choosing ADO or DAO for Working with Access Databases ------------------------------------------------------------------- "When you...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
2
by: Aaron Reimann | last post by:
I have a lot of check boxes. This is an update of the check boxes, I want something was checked, then to do an insert (which is currently working), if something is no longer checked...delete the...
11
by: Paul Brady | last post by:
Apparently, I have been living on the wrong planet. I have written 15 databases in Microsoft Access in the past 10 years, some of which are split, one uses ODBC interface with a SQL server, one...
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: 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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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 projectplanning, 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.