I am getting a invalid regular expression flag w error in the error console

seba766

New Member
I am getting an invalid regular expression flag w error stating this:Notice: Undefined Variable: image_file_name in web/stud/...In view source it is pointing to a blank space underneath this line of code.\[code\]var image_file_name = <?php echo json_encode($image_file_name); ?>;\[/code\]So how can this error be removed from the error console?Below is the javascript function where the line of code is displayed:\[code\] var _cancelimagecounter = cancelimagecounter; $(".imageCancel").click(function() { var image_file_name = <?php echo json_encode($image_file_name); ?>; $('.upload_target').get(0).contentwindow $("iframe[name='upload_target']").attr("src", "javascript:'<html></html>'"); jQuery.ajax("cancelimage.php?fileImage=" + image_file_name) .done(function(data) { $(".imagemsg" + _cancelimagecounter).html(data); }); return stopImageUpload();});\[/code\]Below is the php code where it retrieves the variable \[code\]$image_file_name\[/code\].\[code\]<?php...$image_file_name = $_GET["fileImage"]; echo "File Upload was Canceled"; $imagecancelsql = "DELETE FROM Image WHERE ImageFile = 'ImageFiles/". mysql_real_escape_string($image_file_name)."'"; mysql_query($imagecancelsql); mysql_close();?>\[/code\]
 
Back
Top