Hey All. I have a FORM that updates records in my database. It has three fields. User, Scene and Time. I want it so users can only edit scenes that are empty. So that when someone enters a Scene, that entry is then locked out. And only the user who added it can update it. So basically. The Scene is initially empty. Then someone adds a Scene, there User is attached to the entry. Then Only that user can edit the scene again. Heres the 3 rows: <p> <input name="Time" type="text" id="Time" value="<?php echo $row_MusicBody['Time']; ?>" /> </p> <p> <textarea name="Scene" id="Scene" cols="23" rows="3"><?php echo $row_MusicBody['Scene Description']; ?></textarea> <p> <input name="User" type="hidden" id="User" value="<?php echo $_SESSION['MM_Username']; ?>" readonly="readonly" /> </p> </p>
You can use if statement to do it if(condtition) { } else { } HTML: keep your code in else part and if part