Jump to content

ess14

Members
  • Posts

    45
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ess14's Achievements

Member

Member (2/5)

0

Reputation

  1. just curious, is it better to use regex to check input into databases than using stripslashes/addslashes etc? I figure that using regex to make sure there is only alphanumeric characters in strings no attacks could occur. is this correct? or am i missing something? of course sometimes you want special characters in your DB, so in which case you would addslashes or use other php functions (real escape string etc).
  2. perhaps a regular expression would help, try look that up
  3. im having trouble with passing variables between functions....below is a cut down version of my script. when i try the document.write after calling isSub("no") its just saying 'undefined'. If i change 'theSub = getSub.value' to 'theSub = getSub' the document write is correct (says "no"). I need to keep the getSub.value because thats the only way i could get the value from the radio button at the bottom. any help? function setBase(getBase){ isSub("no"); } function isSub(getSub){ theSub = getSub.value; document.write(theSub); } ---html form element---- <input name="uni_type" id="cut" type="radio" value="no" onClick="isSub(this);" checked="checked"/>
  4. decided on this: preg_match('/' . preg_quote($start, '/') . '(.*)'. preg_quote($end, '/') .'/i', $string, $m);
  5. in my usage it should only have 1 result. ie there will be no more matches. if u look at the above code the start and end can only leave 1 thing. but how do i get that into the array? the full stop is stuffing it up somehow
  6. having a little trouble with this expression....im very new to regular expressions, so its no wonder im having trouble. As you can see (when u run this script) im getting no output. the problem seems to be the fullstop (.) how do i get the array to return the word 'lambs.'? even when i try escape the full stop, its like the stop is still stuffing things up...what am i missing? function findinside($start, $end, $string) { preg_match_all('/' . preg_quote($start, '/') . '([^\.)]+)'. preg_quote($end, '/').'/i', $string, $m); return $m[1]; } $start = "13"; $end = "mary"; $string = "mary has 6 lambs. phil has 13 lambs. mary stole phil's lambs. now mary has all the lambs."; $out = findinside($start, $end, $string); print_r ($out);
  7. ive decided to go with PEARS mail functions (mail_queue) Another question though, how do i test send, say, 5000 emails? Just to make sure they get sent, and see what happens when some arent delivered etc? I have set up a local mail server and I can test that way, but Id really like to test in a WAN environment. If i send 5000 emails to my hotmail, will that have a negative effect on my SMTP host? will they be blacklisted as spam? or should i stick with my LAN testing, and just keep an eye on things when i go online?
  8. Ive been doing more research into the topic and ive decided to go with SMTP relay hosting for emails. If i want to send 10,000 emails out, whats the best way of doing that with php? Ive come accross a couple of options for sending the actual mail from php, what do people think? any other suggestions? -- PEARs mail class with PEAR mail_queue -- php's fsockopen(); any pro's and cons? My main concerns are making sure all emails get sent, and that im not viewed as a spammer from mail servers! All contacts on the list are opt-in!
  9. wow, thats awesome! you have been a wonderful help! i cant thank you enough!
  10. thanks for your help, ive looked into it and im getting closer to where i want to be! Now, im asuming i will have to set my machine up on a static IP so i can get a proper DNS to send email from. I cant send bulk email through my ISP's SMTP and i cant send email from my localhosts dynamic IP address(gets blocked by mail servers). Im not sure if i want to go down this route though.... I guess i will have to find some sort of SMTP hosting for mailouts.... any other ideas?
  11. cheers for the tip. i am looking into the CLI now. Could you please give me more information as to why the CLI is the way to go? And how would i use the CRON jobs? is that not just scheduling? Does anyone else have any insight?
  12. I want to create a system where people sign up to a mailing list. heres the thing though, when they sign up they pick from a number of options that is then stored in a database with their email. I then want to send out emails to all these people relaying the options they picked. is php capable of going through a possible list of 10,000+ rows and individually mailing the user? is there some other way of doing it? do you know of a better system to use instead of php? Would i need my own mailer (as i know most hosts wont alow you to send bulk emails from their servers)? I imagine if i just did select on every user and mailed them from php my script could time out, or emails would be lost. any input, insight and constructive comments welcomed!
  13. haha, thanks!! thats cool, learn something new every day!
  14. ess14

    2 forms

    im not sure exactly what your asking, perhaps be more clear and show some examples of your page/form, and some of your database structure. But here is my solution.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.