What's the difference between tinyint and int?
Printable View
What's the difference between tinyint and int?
I couldn't find anything about it on the php.net site. I'm guessing a tinyint is a byte, an int is equivelent to vb integer and a big int is equivelent to a long. I'm sure I'm wrong. I'm really learning to hate php. :(
I'm obsessed with PHP. It's my new love.
Good, then maybe you can help me out. What do you know about this?
http://www.vbforums.com/showthread.p...hreadid=169676
Also, I want to send myself an e-mail whenever someone registers in my guest book and I have no clue how to do it. I'd like to send them an e-mail as well.
http://www.paulkjohnson.com/guestbook.htm
I gave the first one a shot. As for the e-mail thing, I was just intending to look that up because I need to know how to do it as well. If I find something, I'll let you know. :)
I don't know what all the function variables are, but you can probably figure them out. Recipient, Sender, etc. Seems pretty self explainatory.PHP Code:function send_multiemail ($lc_recipient_email, $lc_recipient_name, $lc_subject, $lc_from_email, $lc_from_name, $lc_sender, $lc_priority, $lc_return, $lc_html, $lc_text)
{
// send email
$boundary = "----=_NextPart_000_" . uniqid("DO_PHP");
// text
$lc_message .= "--$boundary\n";
$lc_message .= "Content-Type: text/plain; \n\tcharset=\"iso-8859-1\"\n";
$lc_message .= "Content-Transfer-Encoding: 7bit\n";
$lc_message .= $lc_text . "\n";
// html
$lc_message .= "--$boundary\n";
$lc_message .= "Content-Type: text/html; \n\tcharset=\"iso-8859-1\"\n";
$lc_message .= "Content-Transfer-Encoding: 7bit\n";
$lc_message .= $lc_html;
// final boundary
$lc_message .= "\n--$boundary--";
/* recipients */
$lc_recipient = "$lc_recipient_name <$lc_recipient_email>";
/* subject */
$lc_subject = "$lc_subject";
$lc_headers = "From: $lc_from_name <$lc_from_email>\n";
$lc_headers .= "X-Sender: <$lc_sender>\n";
$lc_headers .= "X-Mailer: DataOvation\n"; // mailer
$lc_headers .= "Return-Path: <$lc_return>\n"; // Return path for errors
$lc_headers .= "Mime-Version: 1.0\n";
$lc_headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"\n";
$lc_headers .= "X-Priority: $lc_priority"; // Urgent message!
mail($lc_recipient, $lc_subject, $lc_message, $lc_headers);
//end email stuff
return "";
}
Thanks... it looks to me like you're supposed to choose text or html since there is no switch to choose. In other words, you delete one or the other depending on which way you want to send mail.
Otherwise it will always be html because that's the order the code is in.... unless I'm not getting something.
Yeah, I'd have to agree. I just tried to run it, but there was nothing in the body. I even removed the HTML part and just went with the text :confused:
There's an easy mail example on the php site
http://www.php.net/manual/en/function.mail.php
If you want to send plain text, just don't include the extra headers.
To answer the original question, it would appear tinyint will hold 4 digits and int will hold 11.
If you're not doing anything complex, just do:
For headers, just put something like "From: The Hobo <[email protected]>"PHP Code:mail($to, $subject, $message, $headers);
Chris beat me :mad: :)