How to pass the parameter for this code in onclick

echo"<input type=‘submit’ name=‘name’ value=‘delete’ onclick=“Show('”$image"')">
<script type=“text/javascript”>
function Show(hello)
var hai=hello
hello friends help me to pass this parameter i am not getting any 1 tell how to pass the parameter in this like the variable if you can correct the coding and send me a execting 1

Please dont tell to do inside the html i need to do it inside the echo statement only means i need to pass the parameter from their only..
  1. You need to add semicolons to let know PHP that it has reached the end of the line.
  2. Escape your quotes.

echo"<input type='submit' name='name' value='delete' onclick=\\"Show($image)\\">";

sorry friend its not working i dont know why did u checked it pls see the code once more… and send me … and i have added the semicolon in the code here just i typed it… see while i done it the parameter value is not passing…

The issue here might not be PHP.

Does the function Show() requre a string or integer?

Check your Javascript.

my java script code is same as i shown above and i need to pass entire file location with file name through this so what its not getting called while i am using the parameter what you think

Must have skipped over the javascript part.

You need to add quotes to your PHP

echo"<input type=‘submit’ name=‘name’ value=‘delete’ onclick=\“Show(‘$image’)\”>";

thank you very much friend its working can i ask one more thing how we can use a database command inside javascript like Delete from table name where $image=? how we can use this statement inside the javascript

If you want to use javascript then you would need to create an AJAX event to call a php file and then the php would handle the manipulation of the database.

so can i pass this this onclick event value to ajax ? if you know pls tell how we can call it in the ajax…

You can find many examples if you search through Google.