Hi all,
How do I get this to work in PHP?
My problem is the commas in the alert part
echo '<input type="submit" onclick="alert('Are you sure?')" value="Submit" name="submit2">';
Thanks.
Kevin.
| SitePoint Sponsor |





Hi all,
How do I get this to work in PHP?
My problem is the commas in the alert part
echo '<input type="submit" onclick="alert('Are you sure?')" value="Submit" name="submit2">';
Thanks.
Kevin.





echo '<input type="submit" onclick="alert(\'Are you sure?\')" value="Submit" name="submit2">';


but you'd better read manuals, before asking such questionsCode:echo '<input type="submit" onclick="alert(\'Are you sure?\')" value="Submit" name="submit2">';


an alert won't work, since it only alerts, you need a confirm! it's a function, try that instead of alert()
Bookmarks