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

Form data loss

2
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?
May 8 '07 #1
4 1394
MMcCarthy
14,534 Expert Mod 8TB
This question is being moved to the PHP forum.

ADMIN
May 8 '07 #2
Purple
404 Expert 256MB
Hi,

Can you post some more detail about the problem you have - lets have some of the code to take a look at too..

Purple
May 8 '07 #3
nalls
2
Hi,

Can you post some more detail about the problem you have - lets have some of the code to take a look at too..

Purple
Dear friend,

Thank you for your reply.

Herewith I have given sample coding.

In the first file, I have the following form fields,

<form onSubmit = "return validForm(this)" method = "post" action = "complete.php">

<select name = "cardtype">
<option value ="visa" selected>VISA</option>
<option value ="mastercard">Mastercard</option>
<option value ="switch">Maestro</option>
</select>

<input name = "name" type = "text">

</form>


In the action page (complete.php) I have,

$sql = "UPDATE orders SET
name = '".encryptvar($_POST['name'])."',
cardtype = '".encryptvar($_POST['cardtype'])."',
WHERE id = '".$_SESSION['order_insert_id']."'";

Most of the times the values are passed perfectly, encrypted and updated into the database. But some times no data is coming from the form and the table is getting updated. If I look for the values in the table, both fields(name, cardtype) have the encrypted value for a white space.

The strange thing is, even if the customer didn't enter the name and the form validation fails, the cardtype has to be 'VISA'. Because this is the one selected on the list by default. But this also come as a blank in the action page.

Do have any idea friend?

Thanks in advance.

nalls
May 9 '07 #4
Purple
404 Expert 256MB
Hi Nalls,

As with all these things I have more questions before we get to answers:

Can you post the php logic which deals with processing the form
I can see it is using a javascript validation - are you assuming the data returned is clean when the second script runs ?

As a wild guess - could the entries you are seeing on the database be from browsers with javascript disabled ? Or is it from users that have hit refresh / f5 on the screen ?

I need to see more code to help further..

Purple
May 9 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: smilemaster | 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">...
10
by: HB Kim | last post by:
Hello, What could possibly cause data in the SQL server database to be removed, except being deleted manually? We had a couple of situations where data in certain records disappeared although the...
0
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...
4
by: Sean Connery | last post by:
I have a Microsoft UI Process Application Block that is controlling child forms in an MDI parent container. The views node in the app.config file has been set to stayOpen=false. Because there...
6
by: Saket Mundra | last post by:
I have a web application with two forms. After user enters data in first form he is directed to the second form. After Filling the second form as he clicks on save button, the data entered is...
3
by: byeung | last post by:
Hi, I am trying to check if a particular record already exists in an Access database through Excel vba code. Through code obtained at another forum, I got the following: ...
9
by: jhawkins | last post by:
I'm working on Access 2000 at the moment and i've got a small problem in regards to coding a calculation involving a form and a subform. The form i have is called Player Overall Stats and the...
7
by: Jeff | last post by:
I need a way to do the following and cannot seem to find a solution via google. 1. Have a method from the main app to get all open forms 2. Check each open form for a public method 3. If this...
4
by: Haas C | last post by:
Hi all, I have a table with two columns, labeled Year and Loss. In the Year field, I have the numbers 1 to 10,000, each which can or cannot repeat. In the Loss column, i have numbers...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.