Jump to content

I CANT UNDERSTAND Y THIS IS NOT WORKING CAN ANY1 HELP? PLZ


mattm1712

Recommended Posts

 

this is my script,

 

 

<?php

include 'connect.inc';

$result4 = mysql_query("SELECT * FROM comments JOIN users on comments.submittedby=users.name WHERE comments.id=$t");

    while($row = mysql_fetch_assoc($result4));

  {

    $to      = $row['email'];

$subject = 'the subject';

$message = 'hello';

$headers = 'From: [email protected]' . "\r\n" .

    'Reply-To: [email protected]' . "\r\n" .

    'X-Mailer: PHP/' . phpversion();

 

mail($to, $subject, $message, $headers);

  }

?>

 

 

and my tables are

 

users

------------------------------------------------------

name  |    email    |    pass    |    location

 

and

 

comments

------------------------------------------------------

submittedby  |  title      |    id    |  comment

 

i cant see y its wrong

 

A little advice when asking questions:

 

You need to clearly state the problem. Saying "OMG SOMETHINGS WRONG" won't get your question answered. You need to think about whats happening, and actual say what's going wrong. What is actually happening, and how is that different from what you expect to/want to happen? Were there any errors? Was the page completely blank?

 

Do you have error reporting turned on? if not adding

error_reporting(E_ALL);
ini_set("display_errors", 1);

to the top of your script will turn it on.

 

 

also, put code in code tags

 

i have switched error reporting on it says,

 

Use of undefined constant localhost - assumed 'localhost' in /home/sites/moseleyengineering.co.uk/public_html/matt/connect.inc  on line 6

No recipient addresses found in header

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.