nadman123 Posted September 19, 2008 Share Posted September 19, 2008 hi guys, in the below code where do i need to put the escape character(\)??? just write the corrected code plz.... <script language="javascript"> function confirm_delete() { window.location='CustModify.php?custno= <?php echo $_GET["custno"]; ?>&Action=ConfirmDelete'; } </script> thanx in advance...... Link to comment https://forums.phpfreaks.com/topic/124901-php-java-help/ Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 window.location='CustModify.php?custno= &Action=ConfirmDelete'; I think needs to be: window.location='CustModify.php?custno=' . $_GET["custno"] . '&Action=ConfirmDelete'; Link to comment https://forums.phpfreaks.com/topic/124901-php-java-help/#findComment-645369 Share on other sites More sharing options...
nadman123 Posted September 19, 2008 Author Share Posted September 19, 2008 No it is not working i just want to know where to put the "\".... Link to comment https://forums.phpfreaks.com/topic/124901-php-java-help/#findComment-645375 Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 Looks like you don't need it but use a function that does it for you... <br /> function confirm_delete()<br /> {<br /> <br /> <?php $_GET["custno"] = addslashes($_GET["custno"]); ?><br /> <br /> window.location='CustModify.php?custno=<br /> <?php echo $_GET["custno"]; ?>&Action=ConfirmDelete';<br /> }<br /> Link to comment https://forums.phpfreaks.com/topic/124901-php-java-help/#findComment-645377 Share on other sites More sharing options...
nadman123 Posted September 19, 2008 Author Share Posted September 19, 2008 no still it doesn't work.....cuz when this function runs i need to have the url to be like this ....../CustModify.php?custno=%202%20&Action=ConfirmDelete dont worry about the %202%20..cuz there is nothing wrong in there ... Link to comment https://forums.phpfreaks.com/topic/124901-php-java-help/#findComment-645380 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.