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