I want to change an input value depending on a $_POST variable. Something like this:
<?php if ($_POST['yourname'] != "")
{
$('input[name=yourname]').attr('title', $_POST['yourname']);
} ?>
But it doesn’t work. How can I do that?
Thanks!
EDIT: I have this input:
<input class="clearme" name="yourname" type="text" title="Insert your name" />
Add directly to html: