Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Your Message

Click here to log in

What is the number after 87?

 
 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Rate Thread

You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.

Topic Review (Newest First)

  • 10-14-2011, 07:00 AM
    BrianC

    Extract emails/names that are comma delimited in an HTML form and extract only emails for use in a PHP script?

    I have an HTML form that is posting to a PHP script. The user enters in email addresses in the following format: John|[email protected], Bob|[email protected], Tom|[email protected].

    '|' is the delimiting character used to separate the email from the persons name, and ',' is used to separate each of these entries.

    I have to types of data coming in, a persons first name, and a their email address. I wish to be able to split the emails and assign all emails to a variable (like [email protected], [email protected], [email protected]) when the form is submitted so that I can use that data in the PHP mail command. I then want the names stored to another separate variable which I can use to send to an SQL database.

    I know how to do everything except for parsing the data properly.

    I was using a combination of the foreach, explode, and implode statements. But honestly, I have no idea if I am on the right track.

    Thanks,
    -Brian

Posting Permissions

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