Correct nesting of apostrophe's/quotation marks in html/php statement -


so im trying make possible user select file list , delete file server. know there alot of safety concerns neglecting here need basic version of work now. following on other threads here linkby u select file delete:

echo '<a href="delete.php?file=ebooks/'.$name.'" onclick="return confirm(\'are sure?\')">delete</a>'; 

my problem ad variable $name link breaks nesting of quotation marks, escaping them doesn't work since renders string "$name" , not variable. can please give me or me see correct way write statement? thanks

wrap $name in urlencode():

echo '<a href="delete.php?file=ebooks/'.urlencode($name).'" onclick="return confirm(\'are sure?\')">delete</a>'; 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -