1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

PHP question

Discussion in 'Web Design & Development' started by jamesb2, Feb 27, 2015.

Thread Status:
Not open for further replies.
  1. jamesb2

    jamesb2 Thread Starter

    Dec 8, 2007
    I am creating a form in expression web 4. Everything appears to be working correctly when I click submit on the form. All of the fields are filled out and the php script I have does send it to an email address. My question is the following; when I fill out all of the fields in the form, not all of the fields show up. It appears I can only get past 2 fields being filled out before it starts sending blank forms. see the code below.

    $msg =$_POST['WSD-Name'];
    $to='[email protected];
    $subject='Wsd application';

  2. JiminSA


    Dec 15, 2011
    First Name:
    Could you show us the form's html please ...
  3. Ent

    Ent Trusted Advisor

    Apr 11, 2009
    First Name:
    I'm surprised it's doing anything at all.
    Mail doesn't take an arbitrary number of parameters. It takes between 3 and 5.
    What you probably want to do is create a single string variable with all the chunks of the message concatenated together, and then call mail($to, $subject, $wholeMessage);

    Aside, but important.
    Do not use this script on a live website. The reason is that you should never trust the input that your user gives you. Instead you should run validation code to make sure that it is the kind of information you expected for that field, and be extra careful if you want to allow arbitrary text. Otherwise they can do nasty things like breaking databases or sending spam from your website.
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1143878

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice