Jump to content

ev5unleash

Members
  • Posts

    181
  • Joined

  • Last visited

    Never

Everything posted by ev5unleash

  1. Hi All, I'm in the process of learning PHP and I don't know everything so please bare with me. I'm trying to have a simple e-mail script which will send a nice e-mails with variables from a previous form. I don't want to use my PHP servers predefined e-mail settings but define them myself. I plan on using G-Mail's SSL SMTP protocol. Upon looking up scripts for e-mailing I'm always coming across require_once "Mail.php"; in the code with no explanation on where that file is located. I'm currently using this code for to see if it works: <?php require_once "Mail.php"; $from = "Sandra Sender <[email protected]>"; $to = "Ramona Recipient <[email protected]>"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; $host = "ssl://mail.example.com"; $port = "465"; $username = "smtp_username"; $password = "smtp_password"; $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'port' => $port, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } But I get the error Fatal error: Class 'Mail' not found in C:\wamp\www\Quiz\sendmail.php on line 16 If anyone could be so kind to give me an explanation and assist me in understanding, that'd be great. Thanks, Evan
  2. Hi all, I'm slowly developing a system and I've just finished the login system. I was wondering if there are any hackers out there that can give me advice on my sites security... Is hacking it possible? If you are able to compromise it, please tell me how and ideas on how to prevent it. If makes the testing any easier, an account named: evan present. My PHPFreaks validation text document is at: http://codenamestratus.com/phpfreaks.txt The Login page I wished to be tested is at http://codenamestratus.com/login/login.php Thanks,
  3. Alright thanks, I guess that'll help a little. I will probably understand it more when I start coding?
  4. Hey guys, I'm new to PHP and I'm currently teaching myself. I'm looking over some code and I'm confused when to use "." inside of code. Can someone please explain to me? Here's some example code I read from a book: <?php $counter = 1; while ($counter <= 12) { echo $counter." times 2 is ".($counter * 2). "<br />" $counter++; } ?> Thanks!
×
×
  • 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.