Jump to content


  • Posts

  • Joined

  • Last visited


Profile Information

  • Gender
    Not Telling

Howlin1's Achievements


Newbie (1/5)



  1. When I try print some news stories to my homepage I get the following error: SELECT Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) The code that I am using is: <?php require ('news/news.php'); ?> and in the news.php file that code is: <?php include 'inc/connect_db.php'; $result = mysql_query("SELECT * FROM site_news") or die("SELECT Error: ".mysql_error()); $num_rows = mysql_num_rows($result); while ($get_info = mysql_fetch_row($result)) { echo "<td>{$get_info[1]}</td>"; } ?> If I go to the news.php file itself, the code will run and I can see the news story that I have. I have tried using require, require_once, include and include_once but they all come up with the same error. What am I doing wrong?
  2. The information that you call is what's in the name attribute and not the label. So instead of $_POST['t1'] you should have $_POST['QL_name'] etc etc
  3. Have you tried sending the email (content included) to a non gmail address?
  4. What I am seeing is that you haven't set it so the email won't send if one or both of your requirements aren't met. So you need it like if (validatePhone($phone)) { if (check_email_address($email)) { send email } else { invalid email } } else { invalid phone number } So in that case the email will only send if both the phone and email are valid.
  5. I have tried that. I have also tried putting $to = $email and $to = $from and nothing will send to my gmail account but it will send to my hotmail. (I am sure the file is up to date and I use correct email addressed.)
  6. Your form does work when I put my gmail or hotmail email address into it, but when I try and send one to my gmail (via the form you linked to in the zip) it won't send, but it will send an email to my hotmail address.
  7. Yes. The emails will deliver to a hotmail email (granted they get sent to the junk mail) but not a gmail one. @Jacbey I tried that form and it wouldn't send it to my email address.
  8. I got a reply back. I can send an email to a hotmail account but not a gmail account. Me: What would the reason behind the email not being sent to the gmail account? Host: That's generally a mystery deep in the mind of Google I'm afraid. Getting any sort of visibility out of them on that is an eternal struggle. To me that sounds like they don't know. It looks like I'll have to (try) email google and ask them :/
  9. No, I didn't know it might depend on my host. I'll drop them an email and ask. Thanks
  10. @ DevilsAdvocate I did echo out the variables and they contain what they are meant to contain. I even removed everything in the script and put in information myself, and still nothing. I have added the full script as an attachment. @voip03 I did that and still nothing. [attachment deleted by admin]
  11. I didn't put the full script because it wasn't really needed, but there is a value for $Email_address. I didn't put the full script because it wasn't really needed, but there is a value for $Email_address (but it's an attachment now). I only put that in to see if it was saying it was sent. It will be taken out as soon as it does actually work. I only put that in to see if it was saying it was sent. It will be taken out as soon as it does actually work. [attachment deleted by admin]
  12. Hello, I have a registration page and when a user registers I want to send their email an activation code. To test I have the following code. <?php //Send activation Email $to = $Email_address; $subject = "www.WEBSITE.com/"; $message = "Welcome to my website!\r\rYou, or someone using your email address, has completed registration at WEBSITE. You can complete registration by clicking the following link:\rhttp://www.WEBSITE.com/register.php?action=verify&$activationKey\r\r If this is an error, ignore this email and you will be removed from our mailing list.\r\rRegards,\ "; $headers = 'From: noreply@abc.com' . "\r\n" . 'Reply-To: noreply@abc.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); if (mail($to, $subject, $message, $headers)) { echo 'Success'; } else { echo 'Error'; } ?> I have the last if else to see if it is sent to not. I do get a Success message, but I don't get an email at the address (I have checked the spam folder). I have checked the email address and it is correct. I have even waited a few hours and nothing. Why is the email not getting to my account?
  13. Thanks works like a charm!
  • 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.