Php form data script

Hi all
would someone beable to help?
I have been using a free php form data script on my website but I am finding that when people fill in the form that not all the form submissions are getting through and I am not sure if it is the php form script
Would any one be to direct me to a good free php data script that is simple to use
many thanks for your help!

hi there
many thanks for your help!
ok, am  little new to this, so do you mean in my contact.php script I have?
not sure what I would be looking for?
I tried to attach to this post but copuld so zipped it for download here; http://www.thevineproject.org.uk/contact.zip
thanks for your help

Similar Messages

  • Php form processing script

    Hi. I got a program to write a php form processing script. My submit form is for photo submission to my domain email. I published to site and did a test to see if it works i got this error:
    Warning: require_once(F:\Domains\mydomain\mydomain.com\wwwroot/includes/Upload_Photos-lib.php): failed to open stream: No such file or directory in F:\Domains\mydomain\mydomain.com\wwwroot\Upload_Photos.php on line 24 Fatal error: require_once(): Failed opening required 'F:\Domains\mydomain\mydomain.com\wwwroot/includes/Upload_Photos-lib.php' (include_path='.;C:\php\pear') in F:\Domains\mydomain\mydomain.com\wwwroot\Upload_Photos.php on line 24
    What does this mean? How can i solve this so that i can process my form?

    See if the below form helps: You need to create a folder on your server named - upload - this is where any files uploaded will be stored (make sure the folder is writable. Also change the email address where the information that someone who has uploaded a file will go to. Look for the following in the code: $to ="XXXXXXXXXXXX.com";
    <!DOCTYPE html>
    <head>
    <meta charset="UTF-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    #wrapper {
    width: 400px;
    margin: 0 auto;
    </style>
    </head>
    <body>
    <div id="wrapper">
    <?php if(isset($_POST['submit'])) {
    $name = trim($_POST['name']);
    if(empty($name)) {
    $error['name'] = "Please provide your name";
    $location = trim($_POST['location']);
    if(empty($location)) {
    $error['location'] = "Please provide your location";
    $email = trim($_POST['email']);
    if(empty($email)) {
    $error['email'] = "Please provide your email";
    $category_description = trim($_POST['category_description']);
    if(empty($category_description)) {
    $error['category_description'] = "Please provide the category or description";
    $terms_conditions = trim($_POST['terms_conditions']);
    if(empty($terms_conditions)) {
    $error['terms_conditions'] = "Please accept the terms & conditions";
    $allowedExts = array(
       "doc",
      "docx",
            "rtf",
            "txt",
            "pdf",
            "jpeg",
            "jpg",
    $allowedMimeTypes = array(
      'application/msword',
            'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
            'application/rtf',
            'application/x-rtf',
            'text/richtext',
            'text/rtf',
            'application/plain',
      'application/pdf',
      'image/gif',
      'image/jpeg',
    $extension = end(explode(".", $_FILES["file"]["name"]));
    if (empty($_FILES["file"]["name"])) {
        $selectFile = 'Please select a file to upload';
    elseif ( ! ( in_array($extension, $allowedExts ) ) ) {
      $fileTypeNotAllowed = 'File type not allowed';
    elseif ($_FILES["file"]["size"] > 2097152) {
      $fileTooLarge = 'Please provide a smaller file';
    elseif (file_exists("upload/" . $_FILES["file"]["name"])) {
    $fileExists = $_FILES["file"]["name"] . " already exists, Please change the file name ";
    elseif (in_array( $_FILES["file"]["type"], $allowedMimeTypes ) )
        if(!empty($_POST['terms_conditions'])) {
    move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]);
        $fileName = $_FILES["file"]["name"];
        $fileUploadSuccessful = 'File uploaded successfully';
    $to = "XXXXXXXXXXXXX.com";
    $subject   = "Upload to website";
    $headers  = "From: $email\r\n";
    $headers .= "Reply-To: $email\r\n";
    $message = "Name: $name\n\n";
    $message .= "Location: $location\n\n";
    $message .= "Email Address: $email\n\n";
    $message .= "Category/Description: $category_description\n\n";
    $message .= "File: $fileName\n\n";
    mail($to, $subject, $message, $headers);
    $sent = "Mail was sent successfully";
    ?>
    <h1>Form</h1>
    <?php
    foreach ($error as $value) {
        echo "<p>".$value."</p>";
    if(isset($formFieldError)) {
    echo "<p>".$formFieldError."</p>";
    if(isset($selectFile)) {
    echo "<p>".$selectFile."</p>";
    if(isset($fileTypeNotAllowed)) {
    echo "<p>".$fileTypeNotAllowed."</p>";
    if(isset($fileTooLarge)) {
    echo "<p>".$fileTooLarge."</p>";
    if(isset($fileExists)) {
    echo "<p>".$fileExists."</p>";
    if(isset($fileUploadSuccessful)) {
    echo "<p>".$fileUploadSuccessful."</p>";
    ?>
    <form action="upload_file.php" method="post"
    enctype="multipart/form-data">
    <p>
    <label for="name">Name<br>
    <input type="text" name="name" id="name" value="<?php if(isset($name)) {echo $name; }  ?>"/>
    </label>
    </p>
    <p>
    <label for="location">Location<br>
    <input type="text" name="location" id="location" value="<?php if(isset($location)) {echo $location; }  ?>"/>
    </label>
    </p>
    <p>
    <label for="email">Email<br>
    <input type="text" name="email" id="email" value="<?php if(isset($email)) {echo $email; }  ?>" />
    </label>
    </p>
    <p>
    <label for="category_description">Category and Description<br>
    <input type="text" name="category_description" id="category_description" value="<?php if(isset($category_description)) {echo $category_description; }  ?>" />
    </label>
    </p>
    <p>
    <label for="file">File Attachment:<br>
    <input type="file" name="file" id="file" />
    </label>
    </p>
    <p>
    <label for="terms_conditions">Terms & Conditions:
    <input name="terms_conditions" type="checkbox" value="accept" <?php if(isset($_POST['terms_conditions'])) {echo "checked"; }  ?>> (Please check)
    </label>
    </p>
    <input type="submit" name="submit" value="Submit" />
    </form>
    </div>
    </body>
    </html>

  • PHP Form Mail Scripts

    What is a good resource for pre-made PHP Form Mailer Scripts.
    This is for use with a website hosted on GoDaddy.
    My client has a few requirements that the GoDaddy script does
    not offer (and the script I chose from GoDaddy is uneditable). I
    know nothing about scripting but thought I could use a pre-made
    script and modify it...is that crazy thinking on my part?
    Here are the special requests from my client:
    - They'd like to see the time the form was submitted in EST
    (the GoDaddy script puts the time in military time in another time
    zone in the subject line). Can this appear in the body of the email
    as well as the subject line?
    - They'd like the form to be sent to the person submitting it
    as well as to their company
    - They would like to be able to REPLY TO the email they
    receive with the form submission and have it be addressed to the
    person submitting the form. The current script has the email
    addressed to themselves (the company) if they click REPLY TO, so
    they are replying to themselves
    - Although this has nothing to do with the Form Mailer script
    as far as I can guess, they asked that the person filling out the
    form be able to print it prior to submitting (in my opinion,
    though, if i can have a copy of the submission sent to the
    submitter, there's no reason for this). But if anyone knows how to
    do this, please let me know.
    - Finally, the client wants to know if each submission can
    have a unique tracking number assigned to it.
    Thank you all. Any feedback is appreciated.
    Richard

    Hi,
    I can without any doubt recommend Forms 2 Go:
    http://www.bebosoft.com/products/formstogo/index.php
    Very easy to use and even someone like me who don't know a
    lot of
    programming, use it extensively.
    Deon
    "RichyZee" <[email protected]> wrote in
    news:gcvkac$fcp$[email protected]:
    > What is a good resource for pre-made PHP Form Mailer
    Scripts. This is
    > for use with a website hosted on GoDaddy.
    >
    > My client has a few requirements that the GoDaddy script
    does not
    > offer (and
    > the script I chose from GoDaddy is uneditable). I know
    nothing about
    > scripting but thought I could use a pre-made script and
    modify it...is
    > that crazy thinking on my part?
    >
    > Here are the special requests from my client:
    >
    > - They'd like to see the time the form was submitted in
    EST (the
    > GoDaddy
    > script puts the time in military time in another time
    zone in the
    > subject line). Can this appear in the body of the email
    as well as the
    > subject line?
    >
    > - They'd like the form to be sent to the person
    submitting it as well
    > as to
    > their company
    >
    > - They would like to be able to REPLY TO the email they
    receive with
    > the form
    > submission and have it be addressed to the person
    submitting the form.
    > The current script has the email addressed to themselves
    (the company)
    > if they click REPLY TO, so they are replying to
    themselves
    >
    > - Although this has nothing to do with the Form Mailer
    script as far
    > as I can
    > guess, they asked that the person filling out the form
    be able to
    > print it prior to submitting (in my opinion, though, if
    i can have a
    > copy of the submission sent to the submitter, there's no
    reason for
    > this). But if anyone knows how to do this, please let me
    know.
    >
    > - Finally, the client wants to know if each submission
    can have a
    > unique
    > tracking number assigned to it.
    >
    > Thank you all. Any feedback is appreciated.
    >
    > Richard
    >
    >

  • PHP forms & required fields

    i'm creating an inquiry form for a client hosting w/godaddy.
    Site is in DW using godaddy's php form mail script. script
    works fine for sending formmail.
    Is it possible to validate form fields in php? the customer
    wants to have the first name, email address, etc. being a required
    field or the form will not submit. godaddy support is clueless,
    they e-mailed a kb article on changing the form e-mail address as a
    solution.
    can anyone provide insight? thanx in advance!

    Sure it is. It's even possible to do it in javascript before
    the form gets
    submitted.
    Which DW are you using?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "donna_d" <[email protected]> wrote in
    message
    news:fn8468$r4n$[email protected]..
    > i'm creating an inquiry form for a client hosting
    w/godaddy.
    > Site is in DW using godaddy's php form mail script.
    script works fine for
    > sending formmail.
    >
    > Is it possible to validate form fields in php? the
    customer wants to have
    > the
    > first name, email address, etc. being a required field
    or the form will
    > not
    > submit. godaddy support is clueless, they e-mailed a kb
    article on
    > changing
    > the form e-mail address as a solution.
    >
    > can anyone provide insight? thanx in advance!
    >

  • Configurable PHP form emailer

    I'm looking suggestions for a drop-in PHP form emailer
    script... something that I can either configure by using templates
    that are unique to each form or some other method of per-form
    configurability.
    I'm using soupermail.pl now, but would like to move away from
    it because it has issues with certain users who use AOL and have
    Norton security products (they will receive errors when submitting
    the form).
    I do not want to write a generic form mailer from scratch, as
    I am not comfortable with ensuring that it is safe from spammers...
    I would like to find something that I can use from several forms on
    my site. I do not need to write anything to a database, just be
    able to email to variable destination email accounts. I do not want
    to be able to upload or send attachments.
    Thanks for any suggestions.

    Hi there - read my article titled, "Validating your forms
    with PHP" - here:
    http://sourtea.com/articles.php
    At the end of the article, I provide the full, free code to
    do what you're
    looking for.
    HTH, take care.
    Shane H
    [email protected]
    http://www.avenuedesigners.com
    =============================================
    Web Dev Articles, Photography, and more:
    http://sourtea.com
    =============================================
    Proud GAWDS Member
    http://www.gawds.org/showmember.php?memberid=1495
    Delivering accessible websites to all ...
    =============================================
    "JillTW" <[email protected]> wrote in
    message
    news:eeebap$q71$[email protected]..
    > I'm looking suggestions for a drop-in PHP form emailer
    script... something
    > that
    > I can either configure by using templates that are
    unique to each form or
    > some
    > other method of per-form configurability.
    >
    > I'm using soupermail.pl now, but would like to move away
    from it because
    > it
    > has issues with certain users who use AOL and have
    Norton security
    > products
    > (they will receive errors when submitting the form).
    >
    > I do not want to write a generic form mailer from
    scratch, as I am not
    > comfortable with ensuring that it is safe from
    spammers... I would like to
    > find
    > something that I can use from several forms on my site.
    I do not need to
    > write
    > anything to a database, just be able to email to
    variable destination
    > email
    > accounts. I do not want to be able to upload or send
    attachments.
    >
    > Thanks for any suggestions.
    >

  • PHP Form Emailing Fields But No Data

    Hello,
    I am running into a little problem with my PHP form script.  I am able to email my form and receive a message, however the message has no data, except for where I have check boxes.  Can anyone help me solve this dilemma?  Some of the code has been remove intentionally.
    I will post my code:
    <?php
    /* Email Variables */
    $emailSubject = ' Registration Form';
    $webMaster = 'de';
    /* Data Variables */
    $registrationname = $_POST['registrationname'];
    $registrationphone = $_POST['registrationphone'];
    $registrationemail = $_POST['registrationemail'];
    $registrationdistrict = $_POST['registrationdistrict'];
    $registrationposition = $_POST['registrationposition'];
    $onecredit = $_POST['onecredit'];
    $twocredit = $_POST['twocredit'];
    $threecredit = $_POST['threecredit'];
    $body = <<<EOD
    <br><hr><br>
    Name of Register: $registrationname <br>
    Day Time Phone Number: $registrationphone <br>
    Email Address of Register: $registrationemail <br>
    Name of School District: $registrationdistrict <br>
    Position/Job Title: $registrationposition <br>
    Register for 1 Credit: Learning to Use the easyCBM Assessment System: $onecredit <br>
    Register for 2 Credits: In-Depth Knowledge of the easyCBM Assessment System: $twocredit <br>
    Register for 3 Credits: Enroll in Both of the Above Options: $threecredit <br>
    EOD;
    $headers = "From: $email\r\n";
    $headers .= "Content-type: text/html\r\n";
    $success = mail($webMaster, $emailSubject, $body,
    $headers);
    /* Results rendered as HTML */
    $theResults = <<<EOD
    <html>
    <head>
    <title>sent message</title>
    <meta http-equiv="refresh" content="6;URL=http://.html">
    <style type="text/css">
    <!--
    body {
    background-color: #D9D3A9;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 20px;
    font-style: normal;
    line-height: normal;
    font-weight: normal;
    color: #000000;
    text-decoration: none;
    padding-top: 200px;
    margin-left: 200px;
    width: 800px;
    -->
    </style>
    </head>
    <div align="center">Thank you! Your request has been sent.
    You will return to the page in a few moments.</div>
    </div>
    </body>
    </html>
    EOD;
    echo "$theResults";
    ?>

    1) I would bring the line <cfoutput query="CheckUser"> lower down in the code, for example, just before the first table tag.
    2)These are probably mistakes
    <<table border="0" align="center" cellpadding="0" cellspacing="0">
    <input type="hidden" name="LogDate" value="Now()">
    I think they should be
    <table border="0" align="center" cellpadding="0" cellspacing="0">
    <input type="hidden" name="LogDate" value="#Now()#">
    3) You could revise the action page to:
    <cfif isDefined("form.logDate")>
    <cfinsert datasource="manna_premier" formfields="LogDate,TerritoryManager,Status,DSRName,ServiceName" tablename="TMStatusLog">
    <cflocation url="mp_order_form.cfm">
    </cfif>
    The table TMStatusLog must of course have columns LogDate, TerritoryManager, Status, DSRName and ServiceName.

  • Radio button data to php form

    I set up a survey, and I need the info from the radio button
    groups to send to a php form that will email me the results. So far
    I have not been able to get it to work. All I have so far is the
    code below attached to the submit button. I had a working contact
    form that I am trying to add radio buttons to, but they do not pass
    their info like the input text boxs do. I am a beginner with
    actionscript so I am having trouble finding where to get this to
    work. I have all my peramiters set on each radio button too. I just
    do not know what script to add to what I have so it will pass the
    data over to the php form.
    I have the survey as one MC which is inside a scroll pane if
    that matters. What I have so far can be seen here.
    http://ebinx.com/carrand/freestuffswf.swf
    Thanks

    bump

  • Re: Insert data into oracle database using a PHP form

    Hai its different for me, i want to display a data based on the input from php form. I see and trying your script but it didn't work.
    <?php
    // just print form asking for name if none was entered
    if( !isset($query)) {
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Name: ";
    echo "<input type=text size=100 maxlength=200 name=data value=\"$data\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    $data=$_POST;
    stripslashes($data);
    // Select statement
    $query = "SELECT * FROM animal WHERE skin=$data";
    // connect to Oracle
    $username = "xxxxxx";
    $paswd = "xxxxxx";
    $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
    "(HOST=yyyyyyyy)(PORT=1521))".
    "(CONNECT_DATA=(SID=COSC)))";
    $db_conn = ocilogon($username, $paswd, $dbstring);
    //$stmt = OCIParse($db_conn, $query);
    //OCIExecute($stmt, OCI_DEFAULT);
    //OCIFreeStatement($stmt);
    //OCILogoff($db_conn);
    $stmt = OCIParse ($db_conn, $sql);
    OCIBindByName ($stmt, ":name", &$data, -1);
    OCIExecute ($stmt);
    OCIFreeStatement($stmt);
    OCILogoff ($db_conn);
    ?>
    Could you please advice me ? whats wrong with that script ?

    What is the error you get? What solutions have you tried already?

  • Is there a way to export the form data directly in mysql or using php

    Hi,
    I am using Acrobat XI to collect form data and export it as csv/ xml, then I need to import it manually to mysql. Just wondering if there is any way to automate this process so I can just select/ upload the form file and data can be imported to mysql database. I know some php also and tried finding any script but not yet found. So if there is any php script to extract the data from filled form that would also work for me.
    Any help would be appreciated.
    Thanks

    The ADBC, Acrobat Data Base Connection, has been removed from Acrobat starting with version 8.
    LiveCycle created forms support database connectivity.
    See can adobe acrobat pro connect to the sql database? (JavaScript)

  • What Internet Browser Settings Must Be Enable or Disabled for a PHP Form Script to Send a Form???

    Helo,
    I am running Windows XP Pro.
    What Are the Internet Browser Setting that can Stops my form''s data from being received as  emails.
    The Form Date is Received into Selected Email Boxes When the Form is Filled Out from Other PCs.
    http://www.collegestudentvoice.com/form.php
    1. All Emails boxes are set up.
    2. Have turned OFF NetworkSolution Firewall.
    3. Firefox  http referer is SET to  2.
    4. Form generated NO ERRORS  when I fill it out.
    cheers,
    Dreamweaver101.1

    Hello,
    The problem may be in a script but I also believe it has to do with my browser settings.
    How else to explain that the form's data is NOT  received  from my laptop but is received  from pc of my friend in LA and the form developer's pc.???
    There three files that deal with the form email script:
    1.   http://www.collegestudentvoice.com/form.php
    2.  http://www.collegestudentvoice.com/send-email-form.php
    3      FORM  ACTION.PHP File :
    <?php
      require_once('recaptchalib.php');
    $privatekey = "6LfwwsISAAAAAAPShkJ6nV3qkgLDHCe2uXj9RTWw";
      $resp = recaptcha_check_answer ($privatekey,
                                    $_SERVER["REMOTE_ADDR"],
                                    $_POST["recaptcha_challenge_field"],
                                    $_POST["recaptcha_response_field"]);
      if (!$resp->is_valid) {
        die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
      else {
    include_once('Mail.php');
    include_once('Mail/mime.php');
    $errors ='';
    $max_allowed_file_size = 10000000; // size in KB
    $allowed_extensions = array("jpg", "jpeg", "gif", "bmp");
    $upload_folder = 'files/';
        $name_of_uploaded_file =  basename($_FILES['uploaded_file']['name']);
        $type_of_uploaded_file = substr($name_of_uploaded_file,
                                strrpos($name_of_uploaded_file, '.') + 1);
        $size_of_uploaded_file = $_FILES["uploaded_file"]["size"]/1024;
        if($size_of_uploaded_file > $max_allowed_file_size )
            $errors .= "\n Size of file should be less than $max_allowed_file_size";
        $allowed_ext = false;
        for($i=0; $i<sizeof($allowed_extensions); $i++)
            if(strcasecmp($allowed_extensions[$i],$type_of_uploaded_file) == 0)
                $allowed_ext = true;       
        if(!$allowed_ext)
            $errors .= "\n The uploaded file is not supported file type. ".
            " Only the following file types are supported: ".implode(',',$allowed_extensions);
        if(empty($errors))
            $path_of_uploaded_file = $upload_folder . $name_of_uploaded_file;
            $tmp_path = $_FILES["uploaded_file"]["tmp_name"];
            if(is_uploaded_file($tmp_path))
                if(!copy($tmp_path,$path_of_uploaded_file))
                    $errors .= '\n error while copying the uploaded file';
            $Business = Trim(stripslashes($_POST['Business']));
            $ProfessionalSports = Trim(stripslashes($_POST['ProfessionalSports']));
            $Humor101 = Trim(stripslashes($_POST['Humor101']));
            $CollegeSports = Trim(stripslashes($_POST['CollegeSports']));
            $Politics = Trim(stripslashes($_POST['Politics']));
            $EmailToBusiness = $Business . "@collegestudentvoice.net";
            $EmailToProfessionalSports = $ProfessionalSports . "@collegestudentvoice.net";
            $EmailToHumor101 =  $Humor101 ."@collegestudentvoice.net";
            $EmailToCollegeSports = $CollegeSports . "@collegestudentvoice.net";
            $EmailToPolitics = $Politics . "@collegestudentvoice.net";
            $EmailTo = "[email protected]";
            $EMailSubject = Trim(stripslashes($_POST['Subject']));
            $First = Trim(stripslashes($_POST['First']));
            $Last = Trim(stripslashes($_POST['Last']));
            $Email = Trim(stripslashes($_POST['Email']));
            $Suggestions = Trim(stripslashes($_POST['Suggestions']));
            $Body = "The following form has been filled";
            $Body .= "\n";
            $Body .= "---------------------------------------------------------------------------------";
            $Body .= "\n";
            $Body .= "\n";
            $Body .= "First Name: ";
            $Body .= $First;
            $Body .= "\n";
            $Body .= "Last Name: ";
            $Body .= $Last;
            $Body .= "\n";
            $Body .= "Email: ";
            $Body .= $Email;
            $Body .= "\n";
            $Body .= "Business: ";
            $Body .= $Business;
            $Body .= "\n";
            $Body .= "Professional Sports: ";
            $Body .= $ProfessionalSports;
            $Body .= "\n";
            $Body .= "Humor 101: ";
            $Body .= $Humor101;
            $Body .= "\n";
            $Body .= "College Sports: ";
            $Body .= $CollegeSports;
            $Body .= "\n";
            $Body .= "Politics: ";
            $Body .= $Politics;
            $Body .= "\n";
            $Body .= "Suggestions: ";
            $Body .= $Suggestions;
            $Body .= "\n";
            $Body .= "\n";
            $Body .= "---------------------------------------------------------------------------------\n";
            $Body .= "Emails sent to: " . strtolower($EmailToBusiness) . " / " .strtolower($EmailToProfessionalSports). " / " .strtolower($EmailToHumor101). " / " .strtolower($EmailToCollegeSports). " / ".strtolower($EmailToPolitics). "";
            $to = "[email protected]";
            $subject= $EMailSubject;
            $from = "[email protected]";
            $text = "\n $Body";
            $message = new Mail_mime();
            $message->setTXTBody($text);
            $message->addAttachment($path_of_uploaded_file);
            $body = $message->get();
            $extraheaders = array("From"=>$from, "Subject"=>$subject,"Reply-To"=>$Email);
            $headers = $message->headers($extraheaders);
            $mail = Mail::factory("mail");
            $mail->send($to, $headers, $body);
            if ($Business != "")
                        $mail->send(strtolower($EmailToBusiness), $headers, $body);
            if ($ProfessionalSports != "")
                        $mail->send(strtolower($EmailToProfessionalSports), $headers, $body);
            if ($Humor101 != "")
                        $mail->send(strtolower($EmailToHumor101), $headers, $body);
            if ($CollegeSports != "")
                        $mail->send(strtolower($EmailToCollegeSports), $headers, $body);
            if ($Politics != "")
                        $mail->send(strtolower($EmailToPolitics), $headers, $body);
            print "<meta http-equiv=\"refresh\" content=\"0;URL=form.php?suc=y\">";
    ?>

  • Insert data into oracle database using a PHP form

    I'm trying to enter data into my oracle database table using a php form. When I click submit no data is added. Could someone help me please. I'm new to php/oracle thing.
    NOTE: I don't have any problem connecting to the database using php.
    Here is the code I'm using:
    <?php
    // just print form asking for name if none was entered
    if( !isset($query)) {   
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Name: ";
    echo "<input type=text size=100 maxlength=200 name=data value=\"$data\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // insert client's name
    $query = "INSERT INTO client (name) VALUES ($data)";
    // connect to Oracle
    $username = "xxxx";
    $paswd = "yyyyyy";
    $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
    "(HOST=patriot.gmu.edu)(PORT=1521))".
    "(CONNECT_DATA=(SID=COSC)))";
    $db_conn = ocilogon($username, $paswd, $dbstring);
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>
    Thanks for your help. I will also appreciate a better was to do it.
    Tony

    resumption and jer,
    Sorry I cannot format the code for easy reading!
    The page is submitting to itself. See action = \"$uri\". I used the same logic to enter SELECT querries into the database. It pulls and displays data back on the webpage. The code I used for this is below. Compare it with the one above for inserting data into the table.
    <?php
    // connect to oracle
    $username = "xxxxx";
         $paswd = "yyyyy";
         $dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
              "(HOST=patriot.gmu.edu)(PORT=1521))".
              "(CONNECT_DATA=(SID=COSC)))";
         $db_conn = ocilogon($username, $paswd, $dbstring);
    // username and password will be unset if they weren't passed,
    // or if they were wrong
    if( !isset($query)) {
    // just print form asking for account details
    echo "<form action=\"$uri\" method=post>\n";
    echo "<p>Enter Query: ";
    echo "<input type=text size=100 maxlength=200 name=query value=\"$query\">\n";
    echo "<br><input type=submit name=submit value=Submit>\n";
    echo "</form>\n";
    exit;
    // remove unwanted slashes from the query
    $query = stripslashes($query);
    // run the query
    $stmt = OCIParse($db_conn, $query);
    OCIExecute($stmt, OCI_DEFAULT);
    // Open the HTML table.
    print '<table border="1" cellspacing="0" cellpadding="3">';
    // Read fetched headers.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="e">'.ocicolumnname($stmt,$i).'</td>';
    print '</tr>';
    // Read fetched data.
    while (ocifetch($stmt))
    // Print open and close HTML row tags and columns data.
    print '<tr>';
    for ($i = 1;$i <= ocinumcols($stmt);$i++)
    print '<td class="v">'.ociresult($stmt,$i).'</td>';
    print '</tr>';
    // Close the HTML table.
    print '</table>';
    OCIFreeStatement($stmt);
    OCILogoff($db_conn);
    ?>

  • Need help with PHP form with checkboxes, radio buttons and file attachment

    Hi guys,
    I'm having a nightmare with this PHP form where a user can fill it in, attach a doc/pdf and submit. After trying to sort it out with previous code I've used, I've stripped it out and think I should just start again in the hope you geniuses can help!
    Here is the HTML of contact.php:
    <form action="" method="post" name="contact" id="contact">
        <p>Job Title:*<br />
        <input name="position" type="text" /></p>
        <p>Nationality:*<br />
        <select name="nationality">
          <option value="">-- select one --</option>
          <option value="Afghan">Afghan</option>
          <option value="Albanian">Albanian</option>
          <option value="Algerian">Algerian</option>
          <option value="Zambian">Zambian</option>
          <option value="Zimbabwean">Zimbabwean</option>
        </select>
        </p>
        <p>Which country are you currently living in?*<br />
        <select name="country">
        <option value="">-- select one --</option>
        <option value="United Kingdom">United Kingdom</option>
        <option value="Afghanistan">Afghanistan</option>
        <option value="Africa">Africa</option>
        <option value="Zambia">Zambia</option>
        <option value="Zimbabwe">Zimbabwe</option>
        </select>
        </p>
        <label class="radio" for="checkRight">Yes/No question?</label><br />
        <input class="radio" type="radio" name="right" value="Yes" /> Yes
        <input class="radio" type="radio" name="right" value="No" /> No
        <input class="radio" type="radio" name="right" value="N/A" /> Not applicable
        <p>Yes/No question?<br />
        <select name="continue">
        <option value="">-- select one --</option>
        <option value="Yes">Yes</option>
        <option value="No">No</option>
        </select>
        </p>
        <p>Select your resorts:<br />
        Resort 1<input name="res1" type="checkbox" value="Resort 1" />
        Resort 2<input name="res2" type="checkbox" value="Resort 2" />
        Resort 3<input name="res3" type="checkbox" value="Resort 3" />
        Resort 4<input name="res4" type="checkbox" value="Resort 4" />
        Resort 5<input name="res5" type="checkbox" value="Resort 5" />
        Resort 6<input name="res6" type="checkbox" value="Resort 6" />   
        </p>
        <p>Don't send form unless this is checked:* <input type="checkbox" name="parttime" value="Yes" /></p>
        <p>Date of arrival: <input name="arrive" id="datepick" /><br />
        Date of departure: <input name="depart" id="datepick2" /></p>
        <script type="text/javascript" src="assets/scripts/datepickr/datepickr.js"></script>
        <link href="assets/scripts/datepickr/datepickr.css" rel="stylesheet">
        <script type="text/javascript">
        new datepickr('datepick');
        new datepickr('datepick2', {
        </script>
        <p>Name:*<br />
        <input name="name" type="text" /></p>
        <p>E-mail:*<br />
        <input name="email" type="text" /></p>
        <p>Telephone:*<br />
        <input name="telephone" type="text" class="ctextField" /></p>
        <p>Upload CV (Word of PDF formats only):<br />
        <input type="file" name="cv" class="textfield"></p>
        <p><input name="submit" value="Submit Enquiry" class="submitButton" type="submit" /><div style="visibility:hidden; width:1px; height:1px"><input name="url" type="text" size="45" id="url" /></div></p>
    </form>
    By the way, the date boxes work so excuse the Javascript in there!
    To prevent SPAM I've used a trick where there's a hidden URL field which must be left blank for the form to submit which you can see in the PHP.
    Below is where I'm at with the PHP which is placed above the header of contact.php...
    <?php
    if (array_key_exists('submit', $_POST)) {
        $position = $_POST['position'];
        $arrive = $_POST['arrive'];
        $nationality = $_POST['nationality'];
        $parttime = $_POST['parttime'];
        $depart = $_POST['depart'];
        $name = $_POST['name'];
        $email = $_POST['email'];
        $telephone = $_POST['telephone'];
    $to = "[email protected]";
    $subject = "Recruitment Application";
    $message = $headers;
    $message .= "Name: " . $_POST["name"] . "\r\n";
    $message .= "E-mail: " . $_POST["email"] . "\r\n";
    $headers  = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
    $headers .= 'From: My Website <[email protected]>' . "\r\n";
    $message= "
    $url = stripslashes($_POST["url"]);
    if (!empty($url)) {
    header( 'Location: http://www.go-away-spam-robots.com' );
    exit();
    if (!isset($warning)) {
    mail($to, $subject, $message, $headers);
    header( 'Location: http://www.mywebsite.co.uk/sent.php' );
    ?>
    I would like to make pretty much all the field compulsory so if a field is left empty (other than the hidden URL field), a warning message is displayed next to that field.
    Also I would like the file upload field to attach to the email that is sent to me and have the results come through to me in a table format.
    Can anyone help me get my form working?
    Thank you and I hope to hear from you!
    SM

    Hi Nancy,
    Great stuff, thank you for the reply.
    I've managed to get the Formm@iler working and running as I need it to.
    The only thing I'm struggling with is when the user clicks submit, they are taken to a page of whatever results the form returned but it is just a white background with Times New Roman text.
    How can I have it so the user is taken to the form results in the websites' page layout?
    I tried sending them to a generic 'thank you' page by adding the following code but it just took them there whatever the results of the form so that's no good...! I have a feeling it's a bit more complicated than that...
    header( 'Location: http://www.nofussbus.co.uk/test/sent.php' );
    Thank you for your help!

  • How can I change the order of html form data submitted to me via email?

    I am having customers contact me via an html form posted on my website using the "sendtoemail" command. When I receive the data in an e-mail it  is not presented in the order it appears on the web page and I can't seem to find out what dictates the order the data is presented in or how I can change it.
    Anyone have any ideas on how I can make HTML form data elements appear in the order I want?
    Thanks,
    Andy

    Or find a commercial form-to-email script that is compatible with your server's configuration (PHP, ASP, Perl...) and customize it to your needs.
    Formm@ailer PHP from DB Masters
    http://dbmasters.net/index.php?id=4
    FormToEmail.com (free & pro versions available)
    http://formtoemail.com/formtoemail_pro_version.php    
    Tectite
    http://www.tectite.com/formmailpage.php
    Forms to Go from Bebosoft (script generating software)
    http://www.bebosoft.com/products/formstogo/overview/
    Nancy O.

  • My  PHP  form no longer works?

    Hi
    http://www.collegestudentvoice.com/form/form.php
    1. Programmer says there is no coding errors.  Nothing has changed.
    2. Host says there must be coding errors.
    3. There may version incompetibilities with Perl script between the form and the host version.
    these are 3 files:
    Sendform:
    <?php
    // Pear library includes
    // You should have the pear lib installed
    include_once('Mail.php');
    include_once('Mail/mime.php');
    //Settings
    $max_allowed_file_size = 10000000; // size in KB
    $allowed_extensions = array("jpg", "jpeg", "gif", "bmp");
    $upload_folder = 'files/'; //<-- this folder must be writeable by the script
    $your_email = '[email protected]';//<<--  update this to your email address
    $errors ='';
    if(isset($_POST['submit']))
        //Get the uploaded file information
        $name_of_uploaded_file =  basename($_FILES['uploaded_file']['name']);
        //get the file extension of the file
        $type_of_uploaded_file = substr($name_of_uploaded_file,
                                strrpos($name_of_uploaded_file, '.') + 1);
        $size_of_uploaded_file = $_FILES["uploaded_file"]["size"]/1024;
        ///------------Do Validations-------------
        if(empty($_POST['name'])||empty($_POST['email']))
            $errors .= "\n Name and Email are required fields. ";   
        if(IsInjected($visitor_email))
            $errors .= "\n Bad email value!";
        if($size_of_uploaded_file > $max_allowed_file_size )
            $errors .= "\n Size of file should be less than $max_allowed_file_size";
        //------ Validate the file extension -----
        $allowed_ext = false;
        for($i=0; $i<sizeof($allowed_extensions); $i++)
            if(strcasecmp($allowed_extensions[$i],$type_of_uploaded_file) == 0)
                $allowed_ext = true;       
        if(!$allowed_ext)
            $errors .= "\n The uploaded file is not supported file type. ".
            " Only the following file types are supported: ".implode(',',$allowed_extensions);
        //send the email
        if(empty($errors))
            //copy the temp. uploaded file to uploads folder
            $path_of_uploaded_file = $upload_folder . $name_of_uploaded_file;
            $tmp_path = $_FILES["uploaded_file"]["tmp_name"];
            if(is_uploaded_file($tmp_path))
                if(!copy($tmp_path,$path_of_uploaded_file))
                    $errors .= '\n error while copying the uploaded file';
            //send the email
            $name = $_POST['name'];
            $visitor_email = $_POST['email'];
            $user_message = $_POST['message'];
            $to = $your_email;
            $subject="New form submission";
            $from = $your_email;
            $text = "A user  $name has sent you this message:\n $user_message";
            $message = new Mail_mime();
            $message->setTXTBody($text);
            $message->addAttachment($path_of_uploaded_file);
            $body = $message->get();
            $extraheaders = array("From"=>$from, "Subject"=>$subject,"Reply-To"=>$visitor_email);
            $headers = $message->headers($extraheaders);
            $mail = Mail::factory("mail");
            $mail->send($to, $headers, $body);
            //redirect to 'thank-you page
            header('Location: thank-you.html');
    ///////////////////////////Functions/////////////////
    // Function to validate against any email injection attempts
    function IsInjected($str)
      $injections = array('(\n+)',
                  '(\r+)',
                  '(\t+)',
                  '(%0A+)',
                  '(%0D+)',
                  '(%08+)',
                  '(%09+)'
      $inject = join('|', $injections);
      $inject = "/$inject/i";
      if(preg_match($inject,$str))
        return true;
      else
        return false;
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
        <title>File upload form</title>
    <!-- define some style elements-->
    <style>
    label,a, body
        font-family : Arial, Helvetica, sans-serif;
        font-size : 12px;
    </style>   
    <!-- a helper script for vaidating the form-->
    <script language="JavaScript" src="scripts/gen_validatorv31.js" type="text/javascript"></script>   
    </head>
    <body>
    <?php
    if(!empty($errors))
        echo nl2br($errors);
    ?>
    <form method="POST" name="email_form_with_php"
    action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" enctype="multipart/form-data">
    <p>
    <label for='name'>Name: </label><br>
    <input type="text" name="name" >
    </p>
    <p>
    <label for='email'>Email: </label><br>
    <input type="text" name="email" >
    </p>
    <p>
    <label for='message'>Message:</label> <br>
    <textarea name="message"></textarea>
    </p>
    <p>
    <label for='uploaded_file'>Select A File To Upload:</label> <br>
    <input type="file" name="uploaded_file">
    </p>
    <input type="submit" value="Submit" name='submit'>
    </form>
    <script language="JavaScript">
    // Code for validating the form
    // Visit http://www.javascript-coder.com/html-form/javascript-form-validation.phtml
    // for details
    var frmvalidator  = new Validator("email_form_with_php");
    frmvalidator.addValidation("name","req","Please provide your name");
    frmvalidator.addValidation("email","req","Please provide your email");
    frmvalidator.addValidation("email","email","Please enter a valid email address");
    </script>
    <noscript>
    <small><a href='http://www.html-form-guide.com/email-form/php-email-form-attachment.html'
    >How to attach file to email in PHP</a> article page.</small>
    </noscript>
    </body>
    </html>
    FORM:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>College Student</title>
    <link rel="stylesheet" type="text/css" href="css/view.css" media="all">
    <script type="text/javascript" src="js/view.js"></script>
    <script src="js/forms.js" type="text/javascript"></script>
    </head>
    <body id="main_body" >
        <div id="form_container">
    <form action="formaction.php" method="post" enctype="multipart/form-data" name="contactus" id="contactus"  style="border:none;" onsubmit="return validateForm()">
                        <div class="form_description">
                <h2><img src="CSVlogo.GIF" width="269" height="97" alt="Logo" /></h2>
                <p>Please type in your first and last names along with our school email address (i.e., [email protected]) when submitting your articles or photographs.</p>
    <p>Select the category that best describes the subject of  your article or photograph. (i.e., Business, Politics, Sports, Humor, etc.)</p>
    <p>When writing about a sporting event please include the name of the sport in the ‘Subject’ line of your email along with the date of the event and the names of the teams. (i.e., Basketball 01-15-11 L.A. Lakers vs.Detroit Pistons)</p>
            </div>       
            <div>
                    <?php
    if (isset($_GET['suc'])) {
    echo "<div style='color:#F00; padding:15px; display:block; margin:10px 0 10px 0;'> ";
    echo "Thank you for your submission!";
    echo "</div>";
    } else {
    ?>
    </div>
                <ul >
                        <li id="li_5" >
            <label class="description" for="Business">Business </label>
            <div>
            <select class="element select medium" name="Business">
                <option value="" selected="selected"></option>
    <option value="Classified" >Classified</option>
    <option value="careertips" >Career Tip</option>
            </select>
            </div>
            </li>        <li id="li_6" >
            <label class="description" for="ProfessionalSports">Professional Sports </label>
            <div>
            <select class="element select medium" name="ProfessionalSports">
                <option value="" selected="selected"></option>
    <option value="NBA" >NBA</option>
    <option value="NFL" >NFL</option>
    <option value="MLB" >MLB</option>
    <option value="otherprosports" >Other</option>
            </select>
            </div>
            </li>        <li id="li_7" >
            <label class="description" for="Humor101">Humor 101</label>
            <div>
            <select class="element select medium" name="Humor101">
                <option value="" selected="selected"></option>
    <option value="Cartoons" >Cartoons</option>
    <option value="Jokes" >Jokes</option>
    <option value="Stories" >Stories</option>
    <option value="Photographs" >Photographs</option>
            </select>
            </div>
            </li>        <li id="li_8" >
            <label class="description" for="CollegeSports">College Sports</label>
            <div>
            <select class="element select medium" name="CollegeSports">
                <option value="" selected="selected"></option>
    <option value="basketballcollege" >Basketball</option>
    <option value="baseballcollege" >Baseball</option>
    <option value="Footballcollege" >Football</option>
    <option value="Softball" >Softball</option>
    <option value="othercollege" >Other</option>
            </select>
            </div>
            </li>        <li id="li_9" >
            <label class="description" for="Politics">Politics</label>
            <div>
            <select class="element select medium" name="Politics">
                <option value="" selected="selected"></option>
    <option value="statelocal" >State/Local</option>
    <option value="National" >National</option>
    <option value="World" >World</option>
            </select>
            </div>
            </li>        <li id="li_1" >
            <label class="description" for="element_1">Name </label>
            <span>
                <input id="First" name="First" class="element text" maxlength="255" size="40" value=""/>
                <label>First</label>
            </span>
            <span>
                <input id="Last" name= "Last" class="element text" maxlength="255" size="40" value=""/>
                <label>Last</label>
            </span>
            </li>       
            <li id="li_sub" >
            <label class="description" for="Subject">Subject </label>
            <div>
                <input id="Subject" name="Subject" class="element text medium required" type="text" maxlength="255" value=""/>
            </div>
            </li>   
            <li id="li_2" >
            <label class="description" for="Email">Email </label>
            <div>
                <input id="Email" name="Email" class="element text medium required email" type="text" maxlength="255" value=""/>
            </div>
            </li>        <li id="li_3" >
            <label class="description" for="EmailC">Confirm Email </label>
            <div>
                <input id="EmailC" name="EmailC" class="element text medium" type="text" maxlength="255" value=""/>
            </div>
            </li>        <li id="li_4" >
            <label class="description" for="Suggestions">Suggestions </label>
            <div>
                <textarea id="Suggestions" name="Suggestions" class="element textarea medium"></textarea>
            </div>
            </li>
          <li id="li_5" >
            <label class="description" for="Upload">Upload File </label>
    <input type="file" name="uploaded_file">
            <div>
              </div>
            </li>
            <li id="li_6" >
            <label class="description" for="Upload">Are you human?</label>
            <?php
            require_once('recaptchalib.php');
              $publickey = "6LfwwsISAAAAAA7UTKJcDATLiK-e55gPFW1Opfrq"; // you got this from the signup page
              echo recaptcha_get_html($publickey);
            ?>
            <div>
              </div>
            </li>
                        <li class="buttons">
                    <input type="submit" name="Submit" value="Submit" class="button" />
    </li>
                </ul>
    </form>
    <!--        <div id="footer">
            </div>
    -->    </div>
    </body>
    </html>
    FORMACTION
    <?php
      require_once('recaptchalib.php');
    $privatekey = "6LfwwsISAAAAAAPShkJ6nV3qkgLDHCe2uXj9RTWw";
      $resp = recaptcha_check_answer ($privatekey,
                                    $_SERVER["REMOTE_ADDR"],
                                    $_POST["recaptcha_challenge_field"],
                                    $_POST["recaptcha_response_field"]);
      if (!$resp->is_valid) {
        die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
      else {
    include_once('Mail.php');
    include_once('Mail/mime.php');
    $errors ='';
    $max_allowed_file_size = 10000000; // size in KB
    $allowed_extensions = array("jpg", "jpeg", "gif", "bmp");
    $upload_folder = 'files/';
        $name_of_uploaded_file =  basename($_FILES['uploaded_file']['name']);
        $type_of_uploaded_file = substr($name_of_uploaded_file,
                                strrpos($name_of_uploaded_file, '.') + 1);
        $size_of_uploaded_file = $_FILES["uploaded_file"]["size"]/1024;
        if($size_of_uploaded_file > $max_allowed_file_size )
            $errors .= "\n Size of file should be less than $max_allowed_file_size";
        $allowed_ext = false;
        for($i=0; $i<sizeof($allowed_extensions); $i++)
            if(strcasecmp($allowed_extensions[$i],$type_of_uploaded_file) == 0)
                $allowed_ext = true;       
        if(!$allowed_ext)
            $errors .= "\n The uploaded file is not supported file type. ".
            " Only the following file types are supported: ".implode(',',$allowed_extensions);
        if(empty($errors))
            $path_of_uploaded_file = $upload_folder . $name_of_uploaded_file;
            $tmp_path = $_FILES["uploaded_file"]["tmp_name"];
            if(is_uploaded_file($tmp_path))
                if(!copy($tmp_path,$path_of_uploaded_file))
                    $errors .= '\n error while copying the uploaded file';
            $Business = Trim(stripslashes($_POST['Business']));
            $ProfessionalSports = Trim(stripslashes($_POST['ProfessionalSports']));
            $Humor101 = Trim(stripslashes($_POST['Humor101']));
            $CollegeSports = Trim(stripslashes($_POST['CollegeSports']));
            $Politics = Trim(stripslashes($_POST['Politics']));
            $EmailToBusiness = $Business . "@collegestudentvoice.net";
            $EmailToProfessionalSports = $ProfessionalSports . "@collegestudentvoice.net";
            $EmailToHumor101 =  $Humor101 ."@collegestudentvoice.net";
            $EmailToCollegeSports = $CollegeSports . "@collegestudentvoice.net";
            $EmailToPolitics = $Politics . "@collegestudentvoice.net";
            $EmailTo = "[email protected]";
            $EMailSubject = Trim(stripslashes($_POST['Subject']));
            $First = Trim(stripslashes($_POST['First']));
            $Last = Trim(stripslashes($_POST['Last']));
            $Email = Trim(stripslashes($_POST['Email']));
            $Suggestions = Trim(stripslashes($_POST['Suggestions']));
            $Body = "The following form has been filled";
            $Body .= "\n";
            $Body .= "---------------------------------------------------------------------------------";
            $Body .= "\n";
            $Body .= "\n";
            $Body .= "First Name: ";
            $Body .= $First;
            $Body .= "\n";
            $Body .= "Last Name: ";
            $Body .= $Last;
            $Body .= "\n";
            $Body .= "Email: ";
            $Body .= $Email;
            $Body .= "\n";
            $Body .= "Business: ";
            $Body .= $Business;
            $Body .= "\n";
            $Body .= "Professional Sports: ";
            $Body .= $ProfessionalSports;
            $Body .= "\n";
            $Body .= "Humor 101: ";
            $Body .= $Humor101;
            $Body .= "\n";
            $Body .= "College Sports: ";
            $Body .= $CollegeSports;
            $Body .= "\n";
            $Body .= "Politics: ";
            $Body .= $Politics;
            $Body .= "\n";
            $Body .= "Suggestions: ";
            $Body .= $Suggestions;
            $Body .= "\n";
            $Body .= "\n";
            $Body .= "---------------------------------------------------------------------------------\n";
            $Body .= "Emails sent to: " . strtolower($EmailToBusiness) . " / " .strtolower($EmailToProfessionalSports). " / " .strtolower($EmailToHumor101). " / " .strtolower($EmailToCollegeSports). " / ".strtolower($EmailToPolitics). "";
            $to = "[email protected]";
            $subject= $EMailSubject;
            $from = "[email protected]";
            $text = "\n $Body";
            $message = new Mail_mime();
            $message->setTXTBody($text);
            $message->addAttachment($path_of_uploaded_file);
            $body = $message->get();
            $extraheaders = array("From"=>$from, "Subject"=>$subject,"Reply-To"=>$Email);
            $headers = $message->headers($extraheaders);
            $mail = Mail::factory("mail");
            $mail->send($to, $headers, $body);
            if ($Business != "")
                        $mail->send(strtolower($EmailToBusiness), $headers, $body);
            if ($ProfessionalSports != "")
                        $mail->send(strtolower($EmailToProfessionalSports), $headers, $body);
            if ($Humor101 != "")
                        $mail->send(strtolower($EmailToHumor101), $headers, $body);
            if ($CollegeSports != "")
                        $mail->send(strtolower($EmailToCollegeSports), $headers, $body);
            if ($Politics != "")
                        $mail->send(strtolower($EmailToPolitics), $headers, $body);
            print "<meta http-equiv=\"refresh\" content=\"0;URL=form.php?suc=y\">";
    ?>

    bregent,
    you have explained everything was is happening.
    Mine firewall setttings block the scrip so when I fill the form and submit it, I do not get any errors, but that form information does not go anywhere.
    All firewall setting should be OFF  when a form is submitted?
    dreamweavewr101.1

  • Create text file from form data

    I need to create a form using dreamweaver and coldfusion. We
    do not have coldfusion server. just Dreamweaver 8. Until we decide
    what application server we will use, I need to create a text file
    each time a user submits data from a form and put the data into a
    text file. What would be the best way to handle this?

    if you do not have an application server like CF or PHP or
    ASP (or
    other) to process your form submissions, you should look for
    a perl/cgi
    script that can do it for you. i remember from awhile ago a
    script
    called bnbform from bignosebird.com ... it is used for
    emailing form
    submissions to a designated email address, but if i remember
    correctly
    it also stored form data in a text file....
    Azadi

Maybe you are looking for

  • Court filing requires use of firefox 3.6--how do I get rid of 5 and load 3.6 on a MAC

    I'm a lawyer and Mac user. When unsuccessfully trying to use the electronic filing system for federal court, I was provided this pop up after recently upgrading my firefox: "Important News Regarding Firefox 4/5 and CM/ECF The current version of CM/EC

  • Consume External Web Service (WSDL) in ABAP (Release 700) - Proxy Error

    Hi All, Have a requirement to Consume an External Web Service in ABAP. We have the WSDL for Ext. Web Service. Did some research and came across the link: http://help.sap.com/saphelp_nw2004s/helpdata/en/69/8a1e9553dc4baba6026a3db510cadb/content.htm Fi

  • Mail Bundles in Snow Leopard/Leopard

    Hey all ( I was directed to post in this forum after posting in the os x mail question forum) Does anyone know with Leopard and Snow Leopard if this article still applies: http://developer.apple.com/mac/library/documentation/MacOSXServer/Conceptual/X

  • How do I make Firefox the browser but not make it the default browser?

    I want to use Firefox as the browser on some sites but not all. I don't want to make either Firefox or Internet Explorer as a default browser but use each on certaion web sites such as Google or MSN.

  • Updating a TREX index synchronously

    Hi, Is it possible to synchronously update an Index after a change in a document (Portal-KM) or a record (Backend System)? The requested change needs to be on the values at hand only and not to trigger a reindex or incremental update process. Thanks,