Re: [PHP-DB] SQL Insert problem (SOLVED), Thanks!

2004-08-08 Thread Vincent Jordan
Thank you all for the help. I can't believe I forgot something so simple
yet crucial.  

Thanks again for all the help. 

Vinny

 -Original Message-
 From: John W. Holmes [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 05, 2004 11:04 AM
 To: Vincent Jordan; [EMAIL PROTECTED]
 Subject: [SPAM] Re: [PHP-DB] SQL Insert problem
 
 From: Vincent Jordan [EMAIL PROTECTED]
 
$sql = INSERT INTO rmarequest (firstname, lastname, address,
address2,
city, state, zip, phone, email, serial, product, reason,
rmanumber)VALUES
('$firstname', '$lastname', '$address', '$city', '$state',
'$zip', '$phone',
'$email', '$serial', '$product', '$reason', '$rmanumber') or die
(mysql_error());
 
 Uhhh. where's mysql_query()???
 
 $sql = INSERT ...;
 
 $result = mysql_query($sql) or die(mysql_error());
 
 ---John Holmes...
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MAIL() help needed :-(

2004-08-08 Thread Chris Payne
Hi there everyone,

 

I'm having a major problem.  I'm trying to send a message FROM Windows XP
Pro, now this is where it get weird - in some mail packages it WORKS, and in
some it doesn't.  Basically it's an HTML email which is sent when a form is
completed, the results are stored in a DB and then sent on in an HTML Email
Format.  In My outlook 2003, it works, in my friends outlook 2003 which I
setup for him exactly the same way mine is - the email is blank, it is the
same in his outlook express.  My question is, can anyone see anything that I
am doing wrong for this to happen?  Maybe my headers are wrong?  Any help
would be really appreciated as this is really getting to me.

 

This is my first time trying with this method, I usually use a different
method as I use Linux, but the method I use didn't want to work without
sendmail.

 

Thank you everyone

 

 

$to_name = 'To Name; 

$to_email = '[EMAIL PROTECTED]'; 

 

 

$from_name = 'From Name'; 

$from_email = '[EMAIL PROTECTED]'; 

$subject = 'Information Request'; 

$body_simple = 'Simple content for non-MiME-compliant clients'; 

$body_plain = 'This message requires a HTML Capable Client - Such as Outlook
or Outlook Express'; 

$body_html = $messagebody; 

 

$headers = From: \.$from_name.\ .$from_email.\r\n; 

$headers .= to: \.$to_name.\ .$to_email.\r\n; 

$headers .= Return-Path: .$from_email.\r\n; 

$headers .= MIME-Version: 1.0\r\n; 

 

$headers .= Content-Type: text/html; charset=ISO-8859-1\r\n; 

$headers .= Content-Transfer-Encoding: 8bit\r\n\r\n; 

$headers .= $body_html.\r\n; 

 

mail($to_email, $subject, '', $headers);

 

-

 

Regards

 

Chris



Re: [PHP-DB] MAIL() help needed :-(

2004-08-08 Thread John Holmes
Chris Payne wrote:
I'm having a major problem.  I'm trying to send a message FROM Windows XP
Pro, now this is where it get weird - in some mail packages it WORKS, and in
some it doesn't.  Basically it's an HTML email which is sent when a form is
completed, the results are stored in a DB and then sent on in an HTML Email
Format.  In My outlook 2003, it works, in my friends outlook 2003 which I
setup for him exactly the same way mine is - the email is blank, it is the
same in his outlook express.  My question is, can anyone see anything that I
am doing wrong for this to happen?  Maybe my headers are wrong?  Any help
would be really appreciated as this is really getting to me.
Are you sure he isn't just viewing the message in plain text? Each of 
you view the source of the message and see if anything is different. 
This isn't a PHP issue, as far as I can tell.

$body_html = $messagebody; 
$body_html = $messagebody;
$headers .= to: \.$to_name.\ .$to_email.\r\n; 
Don't put a To: header here. That's what the to parameter of mail() is 
for.

$headers .= Content-Type: text/html; charset=ISO-8859-1\r\n; 
Not the best way to send an HTML message. It'll work on some mail 
clients and not on others. Best way is to send a multi-part message. 
Search Google for a tutorial.

--
John Holmes
php|architect - The magazine for PHP professionals - http://www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] LAMP

2004-08-08 Thread Gavin Amm
Thank you all for your input.
I will try Suse 9.1.
If that doesn't work, I can try the http://www.apachefriends.org/en/
distro.

Regards,
Gavin


-Original Message-
From: Gavin Amm 
Sent: Tuesday, 3 August 2004 10:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] LAMP


I'd really like to find a Linux distro that is a LAMP system right out
of the box.
(Linux, Apache, MySQL, PHP)
Are there any out there?

Cheers,
Gav

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] LAMP

2004-08-08 Thread Jurgen Stroo
Or try Debian, and when you login as root, do:
apt-get install mysql php5 apache

There you go, there is your LAMP system :)

Jurgen

---
When a man sits with a pretty girl for an hour, it seems like a minute.
But let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity. [A. Einstein, 1938]

http://jurgenstroo.com
Mercedes W123 230C 1978 (95000km)  */--/* Mercedes W123 300TD 1979 (35km)

This one time, at band camp, Gavin Amm said:

 Thank you all for your input.
 I will try Suse 9.1.
 If that doesn't work, I can try the http://www.apachefriends.org/en/
 distro.

 Regards,
 Gavin


 -Original Message-
 From: Gavin Amm
 Sent: Tuesday, 3 August 2004 10:40 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] LAMP


 I'd really like to find a Linux distro that is a LAMP system right out
 of the box.
 (Linux, Apache, MySQL, PHP)
 Are there any out there?

 Cheers,
 Gav

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php