Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: incrediBILL
The Data path is:
Configure_Blog.php Form reads from config_saved.php into input fields as VALUE=
User edits displayed data
Configure_Blog.php posts data to config.php as $_SESSION variables
config.php writes data back to config_saved.php
POST escapes the "s in the Adsense code and it all work perfectly up to the point where it requires to read the Adsense code back into the next form session as "Existing Code" and it reads it back in UN-escaped and corrupts the form.
I use this code in the form
<td>Menu Ad Code</td>
<td><textarea cols="24" rows="2" onFocus="this.blur()" id="mac" name="mac" ><?php echo ($_SESSION["mac"]);?></textarea></td>
<td><textarea cols="17" rows="2" id="mac2" name="mac2" onfocus="value='<?php echo ($_SESSION["mac"]);?>'" onblur=" mac.value=value;"></textarea></td>
<td>Default Value = None</td>
I think I need to be able to somehow ESCAPE the "s in the retrieved variable before INPUT-ing it.
The form works by displaying the saved data in the (un-editable)LH input field, and uses onblur to update it with user input data from the RH field.