envexlabs Posted May 17, 2007 Share Posted May 17, 2007 Hey, I'm looping out some database values with an AJAX delete button. while($i = mysql_fetch_row($query)) { echo $i[0] . "<br />"; echo $i[1] . "<br />"; echo $i[2] . "<br />"; echo '<a href="javascript: MyAjaxRequest('main','hello.php?ID=' . $i[2] . ' ')">Delete</a><br />'; } the problem is the AJAX link uses both ' and " so the code is breaking. Anyone know a fix? Thanks, envex Link to comment https://forums.phpfreaks.com/topic/51847-ajax-and-php-quick-help/ Share on other sites More sharing options...
taith Posted May 17, 2007 Share Posted May 17, 2007 echo '<a href="javascript: MyAjaxRequest(\'main\',\'hello.php?ID='.$i[2].'\')">Delete</a><br />'; Link to comment https://forums.phpfreaks.com/topic/51847-ajax-and-php-quick-help/#findComment-255505 Share on other sites More sharing options...
envexlabs Posted May 17, 2007 Author Share Posted May 17, 2007 and once again, thanks! Link to comment https://forums.phpfreaks.com/topic/51847-ajax-and-php-quick-help/#findComment-255517 Share on other sites More sharing options...
taith Posted May 17, 2007 Share Posted May 17, 2007 no problemo lol :-D Link to comment https://forums.phpfreaks.com/topic/51847-ajax-and-php-quick-help/#findComment-255523 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.