473,841 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form Data Loss

I have recently started experiencing form data loss. Here is an
example:

====test_form1. php====

<form method="POST" action="test_fo rm2.php">
<input name="textboxva lue" type="text" size="20">
<br>
<input type="submit" value="Submit">
</form>

=============== =======
====test_form2. php====
<?
echo "textboxval ue: ".$textboxvalue ;
?>
=============== =======

(note: these are incomplete examples, I have left out the <html> tags
for example)

After putting in data into the textboxvalue textbox and pressing the
submit button, on the second page only "textboxval ue: " is displayed.
The weird thing is that when I restart my computer, this works fine,
but then stops working again. These pages are encrypted with 128 SSL
encryption (mod_SSL 2.8.15).

This problem has plagued an online app that I am developing and is a
company-wide problem that happens on computers in other offices too.

Here's my info:

SERVER
Apache 1.3.28
PHP 4.3.6
MySQL 3.23.39
mod_SSL 2.8.15
phpMyAdmin 2.50

CLIENT
Windows XP Pro
Internet Explorer 6.0.28
Jul 17 '05
14 3182
Bathroom_Monkey wrote:
<?
echo "textboxval ue: ".$textboxvalue ;
echo 'textboxvalue: ',
isset($_REQUEST['textboxvalue'])
? $_REQUEST['textboxvalue']
: '(no_textboxval ue)';

/* The array $_REQUEST is a combination of $_COOKIE, $_GET, and $_POST
* in an order determined by your PHP configuration */

/* But I really prefer to treat those arrays separately */
echo "<br><br>";

echo "textboxval ue (Post Array): ".$_POST['textboxvalue'];
echo 'textboxvalue (Post Array): ',
isset($_POST['textboxvalue'])
? $_POST['textboxvalue']
: '(no_POST_textb oxvalue)';
echo "<br>GET textboxvalue: ".$_GET['textboxvalue'];
echo '<br>GET textboxvalue: ',
isset($_GET['textboxvalue'])
? $_GET['textboxvalue']
: '(no_GET_textbo xvalue)';
?>


--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
Jul 17 '05 #11
Bathroom_Monkey wrote:
Error checking has yielded very little. After adding the GET
statement to the php code, here is what the error message is when this
problem is occuring:

=============== =============== ======
Notice: Undefined variable: textboxvalue in
/ssl/TEST_nb_TEST/test_form2.php on line 39
textboxvalue:
Notice: Undefined index: textboxvalue in
/ssl/TEST_nb_TEST/test_form2.php on line 43
textboxvalue (Post Array):
Notice: Undefined index: textboxvalue in
/ssl/TEST_nb_TEST/test_form2.php on line 44

GET textboxvalue:
=============== =============== ======
In this revision of fixing this problem, here is what my code looks
like in test_form2.php:
=============== =============== ======
<?
// comment the following lines to turn off error messaging
error_reporting (E_ALL);
ini_set('displa y_errors', 1);
if (!empty($_GET))
{
extract($_GET);
}
else if (!empty($HTTP_G ET_VARS))
{
extract($HTTP_G ET_VARS);
}
if (!empty($_POST) )
{
extract($_POST) ;
}
else if (!empty($HTTP_P OST_VARS))
{
extract($HTTP_P OST_VARS);
}

?>

<html>

<head>
<meta name="GENERATOR " content="Micros oft FrontPage 5.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<title>TEST FORM PAGE 2</title>
</head>

<body>
<br><br>
<?
echo "textboxval ue: ".$textboxvalue ;

echo "<br><br>";

echo "textboxval ue (Post Array): ".$_POST['textboxvalue'];
echo "<br>GET textboxvalue: ".$_GET['textboxvalue'];
phpinfo(); // add this to your code - email it directly to me
// as you may not want this viewable to everyone. ?>
</body>

</html>

=============== =============== ======


This has got to be a platform and or php ini problem. I just cut/pasted
your code and it works for me... see the above addition and comments

Again the question: do you have control over setting the environment
variables and/or system/php/mysql configuration variables?

Michael Austin.
Jul 17 '05 #12
I don't have control over the server variables (php.ini, etc.) as the
servers are hosted by Yahoo! Webhosting. I checked the variables that
everyone has talked about however (like the keep alive, etc.) and they
are all set "correctly" already.

-Karl
Jul 17 '05 #13
smilemaster wrote:
I don't have control over the server variables (php.ini, etc.) as the
servers are hosted by Yahoo! Webhosting. I checked the variables that
everyone has talked about however (like the keep alive, etc.) and they
are all set "correctly" already.

-Karl

is Yahoo! Webhosting willing to make changes to the server to allow you
to execute your code?

Okay, we are going to try this one more time using this code...
basically the same thing only condensed into one php file instead of two.

<?
// comment the following lines to turn off error messaging
error_reporting (E_ALL);
ini_set('displa y_errors',1);
if (!empty($_GET))
{
extract($_GET);
}
else if (!empty($HTTP_G ET_VARS))
{
extract($HTTP_G ET_VARS);
}
if (!empty($_POST) )
{
extract($_POST) ;
}
else if (!empty($HTTP_P OST_VARS))
{
extract($HTTP_P OST_VARS);
}

if (isset($flag) && ($flag > 0))
{
echo "textboxval ue: ".$textboxvalue ."<br>";
echo "<br><br>";
if (isset($_POST['textboxvalue']))
{
echo "textboxval ue (Post Array):
".$_POST['textboxvalue']."<br>";
}
else { echo "POST TEXTBOX VALUE NOT SET<br>";
}
if (isset($_GET['textboxvalue']))
{
echo "textboxvalue:( Get Array)
".$_GET['textboxvalue']."<br>";
}
else { echo "GET TEXTBOX VALUE NOT SET<br>"; }
echo "<form method=post><br ><center>";
echo "<input type=hidden name=flag value=0 >";
echo "<input TYPE=submit value=Back></center>";

echo "</form>";
// phpinfo();

}
else {
echo "<form method=GET>";
echo "<input name=textboxval ue type=text size=20>";
echo "<br>";
echo "<input type=hidden name=flag value=1>";
echo "<input type=submit value=Submit> </form>";
}
?>

if this doesn't work, I suggest bringing up your own server...

Michael Austin.
Jul 17 '05 #14
I think I could probably work with them to make some changes, I'd have
to know what to ask for, however. All of the reccommendation s on this
thread already exist it their settings.

is Yahoo! Webhosting willing to make changes to the server to allow you
to execute your code?

Jul 17 '05 #15

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

Similar topics

1
714
by: Bathroom_Monkey | last post by:
I have recently started experiencing form data loss. Here is an example: ====test_form1.php==== <form method="POST" action="test_form2.php"> <input name="textboxvalue" type="text" size="20"> <br> <input type="submit" value="Submit"> </form>
1
8048
by: teknowbabble | last post by:
I would like to know how to convert HTML code that users input into a TEXTAREA box on a HTML FORM into a separate WEBPAGE. I have something like the diagram below on my webpage. The user is prompted to input his/her HTML Code in the FORM TEXTAREA. By pushing the Make Webpage Button, a new window opens with the output of the HTML contents they inputted. This way people can see what their HTML looks like. HTML FORM TEXTAREA (Where user...
1
2869
by: db_guy | last post by:
Hi, we have a php-based application that is hosted by Yahoo! Webhosting. Ever since the application was created, it has been plagued by periodic session data loss. Here's a typical example: We will successfully input 7 clients into the system, but upon submitting the 8th, all session data fails to enter the MySQL database. After viewing the record in the database, the row is empty except for data that was not stored in a session. I...
0
1551
by: sid | last post by:
Data loss in Access-97 from VB 6.0 I have encountered Random data loss in our access database. Sometimes the users call in saying that the records entered by them are lost. The users, use our VB front end to enter the data (Users do not enter data directly into the database) Most of the times I have noticed that the problem occurs when users add new records. All our tables have a unique alpha-numeric primary key.
7
2299
by: Neil Ginsberg | last post by:
I'm having some problems with an Access 2000 MDB file with a SQL Server 7 back end, using ODBC linked tables. I previously wrote about this, but am reposting it with some additional information and in summary form, in hopes that someone might have an idea about what's going on. I am using a bound form which is losing data a significant portion of the time. Basically, the form contains 6 fields and three subforms, as follows: Field A...
5
6804
by: Sharon | last post by:
I have encountered with a most disturbing TCP problem: I have cases (too many of them) that result in data loss. Some inforamation on my test configuration: I have to PC's which are the same (Dell Dimension 2400). PC1 is the tcp server, PC2 is the tcp client, they two configured to 65535 bytes tco buffer/window, and working in synchronous manner while for each client the server start a dedicated thread. The client send the data size in...
4
1411
by: nalls | last post by:
Hi, I am experiencing data loss while submitting the form. After submitting the form, the data goes to the next page( a .php file) where it has to be encrypted and inserted into the database. But the encryption function gets only a blank space. Can any one help me?
12
3651
by: elliot.li.tech | last post by:
Hello everyone, I'm migrating a C++ program from 32-bit systems to 64-bit systems. The old programmers used some annoying assignments like assigning "long" to "int", which may lead to data loss. Is it possible to let the compiler (specifically, GCC) spew some warnings on this kind of implicit type casts? Or you suggest use some other static source codes analysis tools?
3
1730
by: rahulj | last post by:
I am trying to insert data from one table to another using the query below INSERT INTO SORT_KEY_TEMP2 (SELECT * FROM SORT_KEYS ORDER BY SK_PAGE_ID FETCH FIRST 100 ROWS ONLY); Table SORT_KEY_TEMP2 Name Data type Length Nullable SK_PAGE_ID CHARACTER 8 Yes SK_LAUNCH_DATE TIMESTAMP 10 Yes SK_LIST_TYPE CHARACTER 1 Yes
0
9706
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
10609
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
10667
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
10303
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
9446
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...
1
7851
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7025
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();...
0
5692
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.