Jump to content

benwhitmore

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

benwhitmore's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks for your comments guys. After tralling through AOL, i guess their whitelist system sucks for small time programmers like me. They want 1 cent per email sent from my webform. So, following a suggestion from mainewoods (thanks), I hard coded the FROM email address into my script and it worked. Basically I changed the script to:- [code] <? //set up the mail $recipient = "someone@aol.com"."\r\n\r\n"; $subject = "Contact Request"; $headers  = "MIME-Version: 1.0\n";    $headers .= "Content-type: text/html; charset=iso-8859-1\n";    $headers .= "X-Priority: 3\n";    $headers .= "X-MSMail-Priority: Normal\n";    $headers .= "X-Mailer: php\n"; $mailheaders .= "From: Someones Web Site <someone@anemailaddress.com> \n"; //send the mail mail($recipient, $subject, $msg, $headers); ?> [/code] thanks for looking into this guys, great forum... remember to donate! :) SOLVED
  2. just to add, the email definately does not go into the junk email box. any ideas still? Can i trace the message maybe?
  3. hi peeps, my send mail code works fine with any email address except for AOL ones. My customer assures me that it isnt in the junk folder either. Any clues? [code] <? //set up the mail $recipient = "someone@aol.com"."\r\n\r\n"; $subject = "Contact Request"; $headers  = "MIME-Version: 1.0\n";    $headers .= "Content-type: text/html; charset=iso-8859-1\n";    $headers .= "X-Priority: 3\n";    $headers .= "X-MSMail-Priority: Normal\n";    $headers .= "X-Mailer: php\n";    $headers .= "From: \"".$_POST[name]."\" <".$_POST[emailaddress].">\r\n\r\n"; //send the mail mail($recipient, $subject, $msg, $headers); ?> [/code] thanks in advance for looking!
  4. mate, it took someone to look outside the box - you hit the nail on the head ole boy!! OLD CODE: [code] "omit='n' AND category1 LIKE '%$search%' OR subcategory1 LIKE '%$search%'"; [/code] NEW CODE: [code] "omit='n' AND category1 LIKE '%$search%' OR omit='n' AND subcategory1 LIKE '%$search%'"; [/code] thanks again!!!!! SOLVED
  5. great, thanks for the heads up. it works now, i done it this way incase anyone was wondering.... [code] foreach($_FILES as $image=>$image_array){ if (is_uploaded_file($image_array['tmp_name'])){ list($width_orig, $height_orig) = getimagesize($image_array['tmp_name']); if ($width_orig>400 || $height_orig>400){ echo "That is too big my friend, choose a pic smaller than 400px wide or 400px high"; } } } [/code] thanks again SOLVED
  6. Hi peeps, When I add a record to my database, I also have the option to upload an image associated with that record. How can I verify the images' size befor I upload it. Basically, the image must be less than 400px high or wide. Any feedback welcome Thanks
  7. hi peeps I have a very simple query that works fine:- [code] $query="SELECT id FROM stock WHERE category1 LIKE '%$search%' OR subcategory1 LIKE '%$search%'"; $query_res=mysql_query($query) or die(mysql_error()); [/code] this works fine, the rest of the code returns values that matches my search criteria. If however, I add one more variable to my SELECT statement, PHP seems to ignore it. I want the SELECT statement to choose items where a field named "omit" has a value of "n":- [code] $query="SELECT id FROM stock WHERE omit='n' AND category1 LIKE '%$search%' OR subcategory1 LIKE '%$search%'"; $query_res=mysql_query($query) or die(mysql_error()); [/code] I have items being returned where the value of "omit" = "y" Have I used incorrect syntax in my SELECT statement? any help will flatter my eyelids Cheers
  8. top man, i'll check it out. thanks again!
  9. oh yeah, it does! doh, told you.... damn pollen :P had to use wildcard in search %$keyword%, but it works! Any idea how to search both name and description at the same time? Thanks in advance
  10. set a variable, lets use bg.... [code] $bg='#ffffff'; [/code] now, in your while loop put in your array... and then set the background colour of your table [code] while($row = mysql_fetch_array( $data )){ $bg=($bg=='#ffffff'?'#FFFFCC':'#ffffff'); Print "<tr bgcolor=$bg><td><a href=\"" . $row['pet'] . ".html\">" . $row['pet'] . "</a></td>"; Print "<td><a href=\"pets.html\">".$row['pet'] . "</a></td></tr>"; } [/code] simple hey?
  11. Hi Peeps, I have one table with three fields, id, name, description. I want to perform a keyword search on the table in the description field and then return the id of each record that has a keyword match. I dont think this will work:- [code] "SELECT id FROM table WHERE description LIKE '$keyword'" [/code] Any ideas to point me in the right direction? ps. I dont need to know how to display the results, its just the initial search i am stuck with Thanks in advance!
  12. you could search the posted variable for invalid characters? [code] foreach (count_chars($your_posted_variable, 1) as $i) { $string=chr($i); if ($string=="&"){ echo "You cannot use that character"; } [/code] the above code will search your posted variable for '&'. If this character is found, an error message is displayed. I havent tried the code but I think the syntax is correct (ive just woken up..lol) Hope this helps
×
×
  • 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.