Link to home
Start Free TrialLog in
Avatar of ShaileshShinde
ShaileshShindeFlag for India

asked on

Values does not retains

Hello Experts,

User selects the option and then it hit the submit button the values it has selected gets to default zero whereas the selected values get updated into database.

please find below code for this...
....
<td align="center"><select name="ss1">
		<option value="0">0</option>
		<option value="5">5</option>
		<option value="15">15</option>
		<option value="25">25</option>
		</select>
		<?php
		$notify = "";
		if ($usr_name == 'XSP') {
			$usrid = '2';
		}
		if(isset($_POST['ss1'])){ $notify = $_POST['ss1']; 
		$query = "UPDATE usr_k SET usrslfscre='$notify' WHERE id='1' AND pmid='$usrid'";
		mysql_query($query);
		//print_r($_POST['ss1']); -
		}
			}
        ?>

Open in new window


Thanks in advance,
Shail
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ShaileshShinde

ASKER

Thanks