473,396 Members | 2,037 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.

Form Data Not Sent by Browser

I have a simple form that calls a .php script once submitted. It's
currently on a Linux server. The form data is sent via method="post"
but the data isn't being sent by the browser.

I have tested the form and .php script on another server on a different
network and it works fine.

Anybody run into this issue???

Apr 27 '06 #1
9 1768
You have to post the server-side code to get a real answer.

But just as a guess, the server that 'works' probably has
register_globals=on
while the server that 'does not work' has
register_globals=off

If so, use the php manual to learn how to read the $_POST array

Apr 27 '06 #2
php script:

<?php
echo "$name";
?>

html form:
<form action="handle_form.php" method="post">
<fieldset><legend>Enter your information in the form below:</legend>
<table width="100%" border="0">
<tr>
<td width="16%"><strong>Name:</strong></td>

If I use method="get" in the html form the data entered in the name
text box is not sent to the URL.

FYI - I already tried register globals = ON.
<td width="84%"><input type="text" name="name" /></td>
</tr>
</table>
</fieldset>
</form>

Apr 27 '06 #3
Rik
vi*********@gmail.com wrote:
FYI - I already tried register globals = ON.

And have you examined the $_POST or $_GET array?
What does it say if your print_r() them? Also empty?

Grtz,
--
Rik Wasmus
Apr 27 '06 #4
Yes it's empty.

In the HTML form using method="get" the data entered isn't even sent in
the URL. Is this an Apache server configuration?

This is crazy!

Apr 27 '06 #5
vi*********@gmail.com wrote:
php script:

<?php
echo "$name";
?>

html form:
<form action="handle_form.php" method="post">
<fieldset><legend>Enter your information in the form below:</legend>
<table width="100%" border="0">
<tr>
<td width="16%"><strong>Name:</strong></td>

If I use method="get" in the html form the data entered in the name
text box is not sent to the URL.

FYI - I already tried register globals = ON.
<td width="84%"><input type="text" name="name" /></td>
</tr>
</table>
</fieldset>
</form>


How are you sending the data. I don't see a submit button.
Apr 27 '06 #6
vi*********@gmail.com wrote:
php script:

<?php
echo "$name";
?>

html form:
<form action="handle_form.php" method="post">
<fieldset><legend>Enter your information in the form below:</legend>
<table width="100%" border="0">
<tr>
<td width="16%"><strong>Name:</strong></td>

If I use method="get" in the html form the data entered in the name
text box is not sent to the URL.

FYI - I already tried register globals = ON.
<td width="84%"><input type="text" name="name" /></td>
</tr>
</table>
</fieldset>
</form>


Use print_r($_POST); on the handle_form.php to be sure that the info is
being passed from the form. If it is there, does handle_form.php have a
method coded on it to extract the variables? If not, you need to use
$_POST['name'] when you call it.

Jack
Apr 27 '06 #7
I changed the PHP script with this:

print_r($_POST);

and it does return the values entered. What's my next step???

Apr 27 '06 #8
vi*********@gmail.com wrote:
php script:

<?php
echo "$name";
?>

html form:
<form action="handle_form.php" method="post">
<fieldset><legend>Enter your information in the form below:</legend>
<table width="100%" border="0">
<tr>
<td width="16%"><strong>Name:</strong></td>

If I use method="get" in the html form the data entered in the name
text box is not sent to the URL.

FYI - I already tried register globals = ON.
<td width="84%"><input type="text" name="name" /></td>
</tr>
</table>
</fieldset>
</form>


Check your html for errors - something may be causing the form to be not
processed properly. A validator is available at http://validator.w3.org/.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Apr 27 '06 #9
"v1nce" <vi*********@gmail.com> wrote in news:1146164827.696021.172640
@y43g2000cwc.googlegroups.com:
I changed the PHP script with this:

print_r($_POST);

and it does return the values entered. What's my next step???


join 2003 and get your variables the proper way.

you shouldn't (and can't, according to your config) just get your text
field value by saying

echo $name;

first you need to get the variable from the $_POST array:

$name = $_POST['name'];
echo $name;

voila.
Apr 27 '06 #10

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

Similar topics

1
by: lawrence | last post by:
I'm trying to read up on the rfc's that govern form inputs. Much of what I'm reading is stuff I didn't know before and some of it is alarming. This one left with me questions: ...
16
by: lawrence | last post by:
I was told in another newsgroup (about XML, I was wondering how to control user input) that most modern browsers empower the designer to cast the user created input to a particular character...
10
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is...
5
by: Don | last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is there some way, using JavaScript, to setup a <form> tag to do this? Thanks, Don ----==...
4
by: Alex Sibilev | last post by:
Hello, I have a really weird problem I've been trying to solve it without any luck for the last couple of hours :( I'm writing a "conference board" application (quite similar to ASP.NET...
4
by: jedimasta | last post by:
Good evening all, I'm a relatively new to javascript, but I've been working with ColdFusion and PHP for years so I'm not necessarily ignorant, just stuck and frustrated. Using ColdFusion I'm...
6
by: Boldgeek | last post by:
I am trying to develop an app that will allow automatic updating of a web form which uses multipart/form-data enctype (as it MIGHT be sending an image) I have an example form, which when...
13
by: David W. Fenton | last post by:
I've been struggling the last two days with something I thought was very easy, which is to open a web page with a form on it and populate the form with data passed in a query string (either POST or...
19
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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 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.