<?php
echo '
<input type="file" name="image_path" style="visibility:hidden;" id="image_file">
<div class="input-append">
<input id="photoCover" class="input-large" type="text">
<a class="btn" onclick="$('input[id=image_file]').click();">Browse</a>
</div>
<script type="text/javascript">
$('input[id=image_file]').change(function() {
$('#photoCover').val($(this).val());
});
</script>
';
?>
As you see, this presents a conflict at
<a class="btn" onclick="$('input[id=image_file]').click();">Browse</a>
and at
<script type="text/javascript">
$('input[id=image_file]').change(function() {
$('#photoCover').val($(this).val());
});
</script>
due to the script start ' ending the echo ' how would you fix this? Sorry if it is a stupid question