Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder doubledee's Avatar
    Join Date
    Mar 2011
    Location
    Arizona
    Posts
    939
    Thanks
    21
    Thanked 0 Times in 0 Posts

    Handling Multiple Recipients

    I am thinking of adding the ability to send a PM to several people at once, and have some questions related to this...

    (**Note: I am using Prepared Statements for security.)


    Questions:
    1.) On Coding Forums, the site just takes a list of Usernames delimited by semicolons ( ; ).

    Does that seem like a good approach?


    2.) If I have a query string of Usernames delimited by semicolons in the URL, could that cause any issues?

    For example...
    Code:
    www.Debbie.com/account/send-pm/bigbetty;cutecathy;doubledee;easyeddie

    3.) Are there any *security* risks in #2 if I sanitize things before I stick them in my Prepared Statement?

    Sincerely,


    Debbie

  • #2
    New Coder
    Join Date
    Nov 2011
    Location
    Ratio, Logic
    Posts
    55
    Thanks
    3
    Thanked 6 Times in 6 Posts
    You should show more trust to site where you were expecting to find answer of issue.
    I think the thing is not related to get method. It is making an object or an array of elements where every element is user name. When it comes to send method/function it is just loop through that array.

    I.E.

    PHP Code:
    $pm_users = array('Tpojka''doubledee''someoneElse');

    foreach (
    $pm_users as $pm_user)
    {
      
    send_pm($pm_user);
    }

    function 
    send_pm($pm_user)
    {
    //code to send PM

    My version of story.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •