473,790 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form submission fills form values with garbage

Hey all,

I'm attempting to do some form processing on a server that has
register_global s off, however, I've run into a confusing situation and
need some help.

Basically, the form is a multi-part/form-data form as I have it upload
a file in addition to submit a number of other fields, but the error I
have occurs even when no upload is done.

When I submit the form, all my input field variables get filled with
garbage. Here's the html before submission for one of the fields:

<FORM name="product" action="product .php?mode=add" method="post"
encType="multip art/form-data">
<INPUT type=hidden value=100000000 name=MAX_FILE_S IZE>
Product Name: <INPUT VALUE=<? print ("\"$productnam e\""); ?> size=30
name=productnam e>

The form submits to itself and does some error checking, but to try to
figure this out, I print the variable from the form submission before
my code even touches it at the top of the page and it's garbage.

echo $_POST["productnam e"];

To see an example of all the garbage my fields get, you can look at
http://www.ratlhead.com/php.gif And the garbage there changes...it's
random. You can see my echo statement that I do right before doing
any PHP stuff.

I'm totally confused, as I had this code working on another server,
but not on this one. And I'm guessing something to do with the PHP
enviroment is the problem.

Any input would be appriciated! Thanks!
Jul 17 '05 #1
5 3440
ra******@ratlhe ad.com (ratlhead) schrieb:
Product Name: <INPUT VALUE=<? print ("\"$productnam e\""); ?> size=30
name=productnam e>

The form submits to itself and does some error checking, but to try to
figure this out, I print the variable from the form submission before
my code even touches it at the top of the page and it's garbage.
Try

Product Name: <INPUT VALUE="<?php echo($productna me); ?> size="30"
name="productna me">

I'm totally confused, as I had this code working on another server,
but not on this one. And I'm guessing something to do with the PHP
enviroment is the problem.


Please give us the versions of PHP on both servers.

Regards,
Matthias
Jul 17 '05 #2
Matthias Esken <mu************ @usenetverwaltu ng.org> wrote in message news:<bk******* **@usenet.esken .de>...
Try

Product Name: <INPUT VALUE="<?php echo($productna me); ?> size="30"
name="productna me">

Please give us the versions of PHP on both servers.

Regards,
Matthias


I tried what you mentioned and still get the problem. Both PHP
versions are 4.3.3

I know it sounds totally whack that randomly that form works and other
times it doesn't, but that's how it's been going when I don't touch
the code and submit the form blank. Someone suggested maybe it's the
default charset in the php.ini file, but that's not the case.

I know none of that is much help, but I'm not sure what else to say
without posting the whole file, which I don't really think is
necessary.

Thanks for the help and suggestion!
Jul 17 '05 #3
> I know none of that is much help, but I'm not sure what else to say
without posting the whole file, which I don't really think is
necessary.

Thanks for the help and suggestion!


Is it always YOU who submit the data? i ran into a similar
trouble when people using MACs submitted their Data. Totaly
confusing characters came along.

regards

timo

Jul 17 '05 #4
ra******@ratlhe ad.com (ratlhead) wrote in message > > Try

Product Name: <INPUT VALUE="<?php echo($productna me); ?> size="30"
name="productna me">


for what it's worth, you're missing the closing value paren ( should
be one after '?>') which probably results in different problems.

Product Name: <INPUT VALUE="<?php echo $_POST['productname']; ?>"
size="30" name="productna me">

What is the value that you entered in your screen cap? was it
"body"something ?

Occasionaly I get strange transfers when my server is heavily
loaded...
Jul 17 '05 #5
"ratlhead" <ra******@ratlh ead.com> wrote in message
news:fd******** *************** ***@posting.goo gle.com...
Hey all,

I'm attempting to do some form processing on a server that has
register_global s off, however, I've run into a confusing situation and
need some help.

Basically, the form is a multi-part/form-data form as I have it upload
a file in addition to submit a number of other fields, but the error I
have occurs even when no upload is done.

When I submit the form, all my input field variables get filled with
garbage. Here's the html before submission for one of the fields:

<FORM name="product" action="product .php?mode=add" method="post"
encType="multip art/form-data">
<INPUT type=hidden value=100000000 name=MAX_FILE_S IZE>
Product Name: <INPUT VALUE=<? print ("\"$productnam e\""); ?> size=30
name=productnam e>

The form submits to itself and does some error checking, but to try to
figure this out, I print the variable from the form submission before
my code even touches it at the top of the page and it's garbage.

echo $_POST["productnam e"];

To see an example of all the garbage my fields get, you can look at
http://www.ratlhead.com/php.gif And the garbage there changes...it's
random. You can see my echo statement that I do right before doing
any PHP stuff.

I'm totally confused, as I had this code working on another server,
but not on this one. And I'm guessing something to do with the PHP
enviroment is the problem.

Any input would be appriciated! Thanks!


I'll throw in my two pence worth...

first... have you tried createing another form, something basic that has two
boxes in it for example, and then seeing if you can post the data
successfully on your own server?

secondly... I'm just trying to be helpful here... but what you could do is
change the action on your server to post it to mine... I'll leave it up for
a day but you could change it to something like <FORM
ACTION=http://www.wiredwords. net/phpinfo.php METHOD=POST> and see the
result... Its not a full PHP info, it just dumps POST, GET and REQUEST data
in to a table... if it turns up corrupted there then it might be client
related... at least it should help you get one step closer to resolveing the
problem...

I'll disable the script within 24hours unless you email me otherwise... you
can email me at
randelld
at
fiprojects
dot
com

cheers
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?
Jul 17 '05 #6

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

Similar topics

2
2889
by: Robin | last post by:
Ok, I have a form that on clicking of the Update button first updates the specific record in the db, then Inserts if the vMemo field is not empty. The problem that I'm having is that After updating if you hit the key (refresh) it inserts another record ... I have tried: 1. Clearing the vMemo field after the insert is done (vMemo = "") 2. Setting the value on the form for this field to "" Neither of these are working. It's not...
2
4413
by: Logical | last post by:
I have a form which houses basic inputs, as well as a few multiple select forms. I need to parse all the 'values' which are in this multiple select form (it gets manipulated dynamically client side). I wanted to create a function that loops through all the form elements, and if the type 'select-multiple' is detected, gather the VALUES of each <option> inside it. The bit I'm stuck on is then how to reconstruct this into a form...
16
6171
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 encoding. This arose in answer to my question about how to control user input. I had complained that I had users who wrote articles in Microsoft Word or WordPerfect and then input that to the web through a textarea box on a form I'd created. I've...
3
2931
by: Jack | last post by:
Hi, I have a asp input form of a financial report. Here most of the fields are text boxes where the user need to input the values corresponding to an item. However, there are few items which are calcuated field. Prior to submission of the information, I would like the user to know what the calculated field be (based on the information input in text boxes) before submission of the form. Is there any way to display the calculated value...
10
3592
by: Steve Benson | last post by:
Our regular programmer moved on. I'm almost clueless in Javascript/ASP and got the job of adapting existing code. In the page below, everything works until I added the function checkIt() to validate which radio button was clicked and what was in a textfield. The form is an attendance checking page for a cyber charter school. What I'm trying to accomplish is that if a parent marks the student present, there should not be anything in the...
3
2513
by: User | last post by:
Form A (Main) Text Box 1 Text Box 2 Text Box 3 Form B (Pop-up) Choose a selection for Form A/Text Box 3 Scenario:
6
3059
by: brettev | last post by:
World, I work at a university where the professors have a system to input grades for assignments and calculate final grades, which is output to an excel file. they are then required to get on a different system and click radio buttons in a form to input final grades. i would like to automate this by doing some sort of automated form submission that grabs the information from the excel sheet and selects the correct radio button and then...
27
4759
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it may be because much of the form is populated with data from the db (lists, etc.), but when I leave...
2
1890
by: anusha.vempati9 | last post by:
Hi All, I am calling a cgi file from a perl module. The cgi file contains the HTML form and some HTML fields(like check boxes). In my logic, I am trying to submit the form and calling the same cgi file again. While doing this, i am not able to retain the values of the HTML fields (check boxes values ) which i set earlier before submitting the form.
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9021
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3703
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.