Jump to content


New Members
  • Content Count

  • Joined

  • Last visited

Everything posted by pieterjandc

  1. Haha nice. It works perfectly now. You are a genius. Final configuration sudo nano /etc/ssmtp/revaliases Now contains: root:my_account@telenet.be:smtp.telenet.be:587 pi:my_account@telenet.be:smtp.telenet.be:587 www-data:my_account@telenet.be:smtp.telenet.be:587 Result of mail() is actually '1' now as well. Thanks for the help. I really appreciate. Only 1 question left: Would it be possible to change the configuration so that the mail doesn't appear to be coming from www-data@pieterjan.pro ?
  2. I hope the user will be smart enough to use mysqli_real_escape_string, so obvious cause everybody already uses it. He's just asking a way to itterate the post-data in an easy way
  3. Hi, I'm trying to send a mail from a Webpage (PHP), running on a Raspberry Pi (Apache2, PHP5). The Raspberry Pi is behind a Router from my ISP (Telenet) and they block the SMTP-port(25). But I successfully installed sSMTP with all needed configuration, and I'm able to send emails through the mailhub of my ISP (what off course is what they rather like). sudo nano /etc/ssmtp/ssmtp.conf Contains: root=pieterjan@pieterjan.pro mailhub=smtp.telenet.be:587 rewriteDomain=pieterjan.pro hostname=pieterjan.pro UseTLS=YES UseSTARTTLS=Yes AuthUser=my_account@telenet.be AuthPass=my_password AuthM
  4. Best answer ever ? Here you go: <?php // table with following columns: // id(Auto-Increment), naam, straatnummer, postcodestad if(!empty($_POST)) { $db=mysqli_connect("localhost","root","sql_password","db_name"); $keys = implode(',',array_keys($_POST)); $values = implode(', ', array_map( function ($v) { return sprintf("'%s'", $v); }, $_POST )); $query = "INSERT INTO personen(" . $keys . ") VALUES(" . $values . ")"; mysqli_query($db,$query); mysqli_close($db); echo($query); } else { ?> <!DOCTYPE html> <html>
  • 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.