Jump to content


Photo

Quick syntax question


  • Please log in to reply
2 replies to this topic

#1 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 04 September 2006 - 03:24 PM

hi guys,
I'am trying to add confirm function to my php echo, but think it's not correct. Please tell me what's wrong with it? Thanks in advance.

echo "<a href=".$delete."onClick='return confirm('are u sure?');'>Delete</a>";

I don't need your script, I'll try to write it myself

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 04 September 2006 - 03:28 PM

Use double quotes:
echo "<a href=\"" . $delete . "\" onClick=\"return confirm('are u sure?');\">Delete</a>";


#3 Gruzin

Gruzin
  • Members
  • PipPipPip
  • Advanced Member
  • 448 posts
  • LocationGeorgia

Posted 04 September 2006 - 03:30 PM

Thank you very much  ;)
I don't need your script, I'll try to write it myself




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users