Jump to content

Search the Community

Showing results for tags 'from'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 6 results

  1. I'm new to PHP and working on a mailform with phpmailer with attachment. Everything works fine but the received mail keeps having my Gmail address in the from header. The AddReplyTo address works fine but I don't want to show the gmail address. This is what my code looks like: require('C:\xampp\htdocs\PHPMailer\class.phpmailer.php'); $mail = new PHPMailer(); // create a new object $mail->IsSMTP(); // enable SMTP $mail->SMTPDebug = 2; // debugging: 1 = errors and messages, 2 = messages only $mail->SMTPAuth = true; // authentication enabled $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail $mail->Host = 'smtp.gmail.com'; $mail->Port = 465; $mail->Username = 'myaccount@gmail.com'; $mail->Password = 'mypassword'; $mail->SetFrom('e-mail@address.com', 'email@address.com'); $mail->AddReplyTo('e-mail@address.com', 'e-mail@address.com'); $mail->AddAddress("myaccount@gmail.com", "MyAccount"); $mail->Subject = "TestMail"; $mail->Body = "This is the message body"; $mail->AddAttachment("test.txt", "test.txt"); // optional name if(!$mail->Send()) { echo "Error"; exit; } else { echo "OK"; } I only want to use the gmail smtp but want to show another e-mail address (e-mail@address.com in thie example) in the header. But it keeps showing myaccount@gmail.com. Also in the class.phpmailer.php I've configurated the $From, $FromName and $Sender as e-mail@address.com but this doesn't work. Can somebody help me with this?
  2. Hi I have taken a ready php script and i have tryid to add one more field to it so it will also send me the name of the user that send me this email but as i have add it now the script don't work any more and if it did work it didn't send me this new field i have add i also need to do also a check that this field is with text and if it is without text then it need to give a popup as it do with all the rest so if you can help me fix this code it will help me a lot thanks Yours Tamir mail.zip
  3. When sending email using the mail function in PHP, I can't get the from field to show what I want it to. In the header, I set the from email to be webmaster@mysiteExample.com, but it comes out with somemailboxcode123@mysiteExample.com. How can I fix this? Here's a slightly modified version of my code function email($from, $name, $subject, $body){ $emailFrom="webmaster@mysite.com"; $headers = 'From: Web Form <' . $emailFrom . '>' . "\r\n" . 'Reply-To: ' . $aDifferentEmailAddress . "\r\n" . 'X-Mailer: PHP/' . phpversion(); $send = mail($emailTo, $subject, $body, $headers); }
  4. can anyone help me with this I do not know if this is safe, if not can someone tell me how I can do this? $id //* is pagination $per_page //* how many i show per page $getquery = mysql_query("SELECT * FROM `videos` WHERE $construct ORDER BY date DESC LIMIT $id, $per_page"); Any help is appreciated
  5. Ok so more on my lil comic app... (and all was going so well) GOAL: Trying to take a value from a form and create sql statement to look for that comic title in the DB and show what has been entered. (I.E search for Spider-Man -> Shows all Rows that Pertain to Spider-Man) So I can't figure out what is wrong with my code. Soon as I enter in my while statement my php failes however my query seems to be doing just fine. I've used the same kind of template on other pages and it works just fine the only difference is when I added a WHERE statement to my sql query. * NOTE: If I take the output of my query and plug it into mysql workbench I get the correct tables and results so I'm yeah kinda confused. * NOTE: The way I retrieve the $data variable is from a query from the form page which pulls all the comic names from the DB and displays in a drop down so the values that it passes are the exact same names / titles from the DB itself. <?php require('./scripts/con_db.php'); // Query DB for Comic_Names // $data = $_POST['comic_name']; $query = "SELECT * FROM `comic_db`.`comic_db` WHERE `comic_name`='$data'"; $com_sql = mysqli_query($comic_connect, $query); if (!$com_sql){ echo "Failed to connect to db" . mysqli_errorno(); } ?> <body> <p align="center"><img src="./images/comic_front.png" /></p> <table align="center"> <tr> <?php while($row = mysqli_fetch_array($com_sql)) { echo "<td>" .$row "</td>"; } ?> </tr> </table> <br /> <br /> <?php require('./scripts/footer.php'); ?> I should also say i've tried these other passes as well with no luck : <?php while($row = mysqli_fetch_assoc($com_sql)) { echo "<td>" .$row "</td>"; } ?> while($row = mysqli_fetch_assoc($com_sql)) { echo "<td>" .$row['comic_name'] "</td>"; } ?> <?php while($row = mysqli_fetch_assoc($com_sql)) { echo "<td>" .$row['$data'] "</td>"; } ?> I've also tried something I found in a book that says to do extract($row) then do my echo "<td>" .$row "</td>"; but that didn't work either so I'm missing something here is what the output for the SELECT string gives me as well from the browser which seems to be fine and again if I plug into mysql workbench it displays what I need.. SELECT * FROM `comic_db`.`comic_db` WHERE `comic_name`='Iron Man - V5' TY for help guys I've try to keep the ??'s down but I'm missing something (probably pretty obvious) so I need some guidence.
  6. Hello, i dont know ho to select from more tables. How to ad more tables in to this ? ("SELECT * FROM tabel_1 WHERE channel LIKE '%funny%' ORDER BY date DESC LIMIT $id, $per_page"); And is this safe ? if not how can i make it safe ? 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.