Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Member nufftalon's Avatar
    Join Date
    Dec 2012
    Posts
    77
    Member #
    34119
    Liked
    4 times
    I created a php form but when I choose to upload images it doesnt email the images. Do I have to do something on the server side for this work or do I need to add extra code in my php?

    autoseum dot org/sellcar.php

    any help would be greatly appreciated.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    First off ... this line:
    <form action="" method="post" class="general" id="form1">

    Needs to include multipart:
    <form action="" method="post" class="general" id="form1" enctype="multipart/form-data">

    After that, the PHP script needs process the image files along with all of the other stuff.
    You didn't post any PHP scripting, so I can't help you there.


  4. #3
    Member nufftalon's Avatar
    Join Date
    Dec 2012
    Posts
    77
    Member #
    34119
    Liked
    4 times
    Hi sorry here is the code

    if(isset($_POST['sentit'])){
    $year = $_POST['year'];
    $make = $_POST['make'];
    $model = $_POST['model'];
    $cartype = $_POST['cartype'];
    $drivetrain = $_POST['drivetrain'];
    $engine = $_POST['engine'];
    $transmission = $_POST['transmission'];
    $mileage = $_POST['mileage'];
    $carfax = $_POST['carfax'];
    $vin = $_POST['vin'];
    $price = $_POST['price'];
    $image1 = $_POST['image1'];
    $image2 = $_POST['image2'];
    $image3 = $_POST['image3'];
    $image4 = $_POST['image4'];
    $image5 = $_POST['image5'];
    $name = $_POST['name'];
    $phone = $_POST['phone'];
    $email = $_POST['email'];

    $today_is = date('n/d/Y');
    $sendto = "email@hotmail.com";

    $email_subject = "Car Ad";
    $headers = "From: No_Reply@autoseum.org\r\n";
    $headers .= "CC: info@autoseum.org\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

    $email_message = "Date Submitted: $today_is<br /><br />
    Year of Car $year <br />Car Make $make <br /><br />
    Car Model Type $cartype <br />
    Drivetrain Type $drivetrain <br />
    Car Engine $engine <br />
    Transmission $transmission <br />
    Mileage $mileage <br />
    Carfax $carfax<br />
    VIN $vin <br />
    Price $price<br />
    Car Image1 $image1<br />
    Car Image2 $image2<br />
    Car Image3 $image3<br />
    Car Image4 $image4<br />
    Car Image5 $image5<br />
    Sellers Name $name<br />
    Sellers Phone Number $phone<br />
    Sellers Email $email";

    mail("$sendto","$email_subject","$email_message"," $headers");
    echo "<br /><center>
    Information Sent. Someone will contact you shortly.
    </center>";

    }else{

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    So there's another issue that makes this a problem.

    When you send HTML emails, the photos won't go with the email. The photos need to be uploaded to a website and then the HTML email contains hotlinks to those photos. That's a whole other bunch of scripting, and you have to store the photos in a directory somewhere on your website.

    This poses the question of whether you should have everything uploaded to your site and no emails sent, or upload everything to your site and send an HTML email. It sounds like you should have everything uploaded to your site and you (the admin person) logs in and manages the information.

    In fact, the person who is entering the information should have already registered and created a user profile. Again, this is a whole other CMS (content management system).

    I don't know what else to say ... you're going about this the wrong way I believe.


  6. #5
    Member nufftalon's Avatar
    Join Date
    Dec 2012
    Posts
    77
    Member #
    34119
    Liked
    4 times
    Oh ok I update this website frequently would it be too hard to have it save to a database or something? If not I could make a folder called car registry or something on the website.

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,717
    Member #
    5580
    Liked
    718 times
    It's too hard to describe or provide code on a forum like this.

    You might be able to find an existing system ... even something like WordPress?

    Or hire a freelance programmer?


  8. #7
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Maybe you could use a ready-made classified ad CMS like Noah's Classifieds.
    nufftalon likes this.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  9. #8
    Member nufftalon's Avatar
    Join Date
    Dec 2012
    Posts
    77
    Member #
    34119
    Liked
    4 times
    Thank you so much Alphamare I will look into this.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

everything about php forms

Click on a term to search for related topics.
All times are GMT -6. The time now is 12:34 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com