It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming PHP and MySQL Forum

PHP Forms HELP!!! Please

Moderator: Malcolm

PHP Forms HELP!!! Please

Postby karlzoe on Wed Jun 08, 2005 3:03 am

I am new to PHP. I am developing a form. My form is structured as follows:



<form name="form" method="post" action="contact.php">

Name:<input name="contact" type="text" id="Contact2">

Email : <input name="email" type="text" id="email">

Website Title: <input name="title" type="text" id="title">
Description of site:: <textarea name="description" id="description"></textarea>

Category: </font><font size="2"> <input name="category" type="text" id="category">
Your URL Address <input name="url1" type="text" id="url1" value="http://">

Theme Page: <input name="url2" type="text" id="url2" value="http://mysite.com/links/mytheme.htm">

Your Link: <input name="url3" type="text" id="url3" value="http://">

<input type="submit" name="Submit" value="Submit">

<input name="Reset" type="reset" id="Reset" value="Reset">



Here is my contact.php code:


<?php $contact = $_REQUEST['contact'] ;
$email = $_REQUEST['email'] ;
$title = $_REQUEST['title'] ;
$description = $_REQUEST['description'] ;
$category = $_REQUEST['category'] ;
$url1 = $_REQUEST['url1'] ;
$url2 = $_REQUEST['url2'] ;
$url3 = $_REQUEST['url3'];
mail( "me@mydomain.com", "Information Requested",
$contact, "From: $email" );
header( "Location: http://www.mydomain.com/thankyou.htm" );?>



The problem is I would like to receive all the information emailed to me. If I use one field such as I did using $contact , I get that in the body of the message which is emailed to me.

The problem is I dont know how to set it up to receive messages from all the fileds such as Web Site Title, Description, category etc.

If I am using just one field it works fine but when I have to incorporate many fields, I do not get the response to my email address.

Someone please help me configure this script for many fields. If I could work with the existing script I would appreciate it because I somewhat understand it.

Thanks to infinity!!
karlzoe
 
Posts: 2
Joined: Wed Jun 08, 2005 2:59 am

Postby Malcolm on Wed Jun 08, 2005 3:43 am

Try something like:
Code: Select all
$output = $contact . "\n" . $title . "\n" . $description . "\n" . $category . "\n" . $url1 . "\n" . $url2 . "\n" . $url3;
mail( "me@mydomain.com", "Information Requested", $output, "From: $email" );
Image
User avatar
Malcolm
100+ Club
 
Posts: 198
Joined: Thu Oct 07, 2004 9:53 pm
Location: Ontario, Canada

Malcolm, Did You Say Try This

Postby karlzoe on Wed Jun 08, 2005 9:54 pm

You definitely are on the money...perfection personfied....my appreciation and thanks are infinite


It works :lol: :lol: :lol: :lol: :lol: :lol: :D :D :D :D
karlzoe
 
Posts: 2
Joined: Wed Jun 08, 2005 2:59 am

Postby Malcolm on Wed Jun 08, 2005 11:31 pm

Glad I could help.
Image
User avatar
Malcolm
100+ Club
 
Posts: 198
Joined: Thu Oct 07, 2004 9:53 pm
Location: Ontario, Canada


Who is online

Users browsing this forum: No registered users and 0 guests