Welcome to Dream.In.Code
Become a PHP Expert!

Join 150,170 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,288 people online right now. Registration is fast and FREE... Join Now!




The Ultimate Challenge

 
Reply to this topicStart new topic

The Ultimate Challenge, Cant get more confused

NIXZ
27 Aug, 2008 - 05:32 AM
Post #1

D.I.C Head
**

Joined: 26 Jul, 2008
Posts: 91

I ve completed a form with:
3 radio boxes
11 checkboxes
8 textboxes
1 textarea

by the click of the submit button all this info will be sent to a php file
and want for the php to send all this info as an email:

$to = "myemail";
$from = "text from the first checkbox named email";
$subject = "none of your bussiness"
$body = "email"

email =
Model: "the radio box option he choosed"
Name: "the text from the second checkbox named name"
Adress:....
...the checkboxes has to be posted as:
Option1: "False if he didnt checked or true"...
...
Comments: "the text from the textarea named comments"

HELPPPPPPPPPPPPPPP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

i know that $sybject has to be something like: "Model: "the radio box option he choosed"/n Name: "the text from the second checkbox named name""

it could be alot easier if it worked like vb:

Dim Subject

Subject = "Name:" & Textbox1.Text & Char(36) & "Name:" &....

I hate php(i actually havent learned anything that will give me the option to hate it)
but I LOVE VB thank you bill.

This post has been edited by NIXZ: 27 Aug, 2008 - 05:42 AM
User is offlineProfile CardPM
+Quote Post

NIXZ
RE: The Ultimate Challenge
27 Aug, 2008 - 05:57 AM
Post #2

D.I.C Head
**

Joined: 26 Jul, 2008
Posts: 91

CODE

$_GET["model"];
$_GET["app1"];
$_GET["app2"];
$_GET["app3"];
$_GET["app4"];
$_GET["app5"];
$_GET["app6"];
$_GET["app7"];
$_GET["app8"];
$_GET["app9"];
$_GET["app10"];
$_GET["app11"];
$_GET["email"];
$_GET["onoma"];
$_GET["adress"];
$_GET["state"];
$_GET["city"];
$_GET["tk"];
$_GET["sphone"];
$_GET["kphone"];
$_GET["comments"];


that's the code to get the variables?
probably since "comments" is text it will be in format of "the text he typed here"
but what i dont understand is in what format will the "app1" be since its a checkbox
will return as "True" if checked or "False" if not?
the most weird is the "model" its a radio box it will return as the id ?

we have 3 radio boxes with the same name and nothing to make them differenent
how can i know what he clicked ? by its id?
<input type="radio" name="model" id="option1" checked="checked">Cheese<br>
<input type="radio" name="model" id="option2">Pizza



This post has been edited by NIXZ: 27 Aug, 2008 - 06:02 AM
User is offlineProfile CardPM
+Quote Post

NIXZ
RE: The Ultimate Challenge
27 Aug, 2008 - 06:35 AM
Post #3

D.I.C Head
**

Joined: 26 Jul, 2008
Posts: 91

Just discovered that i have to use "$_POST" instead of "$_GET"
User is offlineProfile CardPM
+Quote Post

JBrace1990
RE: The Ultimate Challenge
27 Aug, 2008 - 07:29 AM
Post #4

D.I.C Regular
Group Icon

Joined: 9 Mar, 2008
Posts: 479



Thanked: 24 times
Dream Kudos: 350
My Contributions
well, you don't HAVE to, but it's much better to use post =)

for the mesage, just add each line at a time:

php
$email = "Model:".$_POST['model']."\n";
$email .= "Etc";

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 03:14AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month