Re: Form Variables

From: Date: Thu, 24 Oct 2002 16:34:42 +0000
Subject: Re: Form Variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121308@lists.php.net to get a copy of this message
Pushpinder Singh Garcha <pgarcha@masterstream.com> wrote... : > Hi > > I am making use of php forms in my website. Can the names of variables > be the same on two forms. Both the php forms are located in the same > directory in the website folder. I am simply collecting data from the > user using a PHP form and sending this data to myself in the form of an > email. it does not matter what directory forms are in, what matters are actual pages. > I also have another problem...when I make use of radio buttons on the > form the email submission scheme does not work fine > e.g. > > > I have 1 form called application.php and in this form method/action I > am doing the following. > <form method="post" action="send_application.php"> > > In the application.php form I have 1 question and 2 radio buttons > > Did you meet this requirement? > <input type="radio" name="button1" value="yes"> > Yes > <input type="radio" name="button1" value="no"> > No <br> > > In the send_application.php part , I am collecting this input of the > user in this way and then mailing it to myself using the following php > code > > <? > $msg = "Question 1 : $button1\n"; > > $to = "email@email.com"; > $subject = "Form"; > $mailheaders = "From: psgarcha <> \n"; > $mailheaders .= "Reply-To: $email\n\n"; > > mail($to, $subject, $msg, $mailheaders); > ?> > > > Is this correct??? Please help me out..As when I do this I am not > getting any email !! Email has nothing to do with the form. You first collect the data (form) then send that data via mail. Anyhow, everything look fine in your code. Are you sure you have sendmail or qmail installed on server? Can something send a mail from there? Is that a windows? -- Maxim Maletsky maxim@php.net www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3

« previous php.general (#121308) next »