Donate Share

SAJA - Secure AJAX for PHP

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Commas, Semicolons breaking arguments to func

You are viewing a single message from this topic. View all messages.

  1. 2008-08-14 13:59:00 UTC
    Whenever I pass a string that contains commas or semicolons to a function using saja->run, it doesn't work. Two things happen:

    1. If I just try to pass it in, the function doesn't seem to even run.
    2. If I use urlencode() on the string and then pass it in, the function loads, but that specific argument comes through without anything in it (i.e. a blank variable in PHP).

    I've tried a bunch of different things but can't seem to figure it out. Does anyone have any ideas? I see a post dating back to 2006 with a similar issue, but nobody seems to have resolved it (or at least posted the fix).

    Thanks a ton in advance!

    -rob

    Here's the code:

    $partnum = urlencode($row['PARTNUMBER']);
    $descrip = urlencode($row['DESCRIPTN']);
    echo "<tr id=\"row$i\" onclick=\"".$saja->run("MyPHPFunction('row$i','$partnum','$descrip','$sessionid')->myDiv")."\"><td>" . $row["PARTNUMBER"] . "</td><td>";
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.