Php form not including a field in the email sent to me
I have tried to add a phone field to an existing form on my site, I just duplicated the existing email field and changed to say phone instead. The form works fine except that the email that comes through to me has all entered data from the form except for the phone field. Help would be great as I am a bit of a newbie.
Here is the mail.php:
<?php
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$phone = $_REQUEST['phone'] ;
$comments = $_REQUEST['comments'] ;
$message =
Name: $name\n
Email: $email\n
Phone: $phone\n
Comments: $comments
mail( "removedforprivacy", "Email from my website, sent by $name",
$message, "From: $email" );
?>
Here is the form HTML:
<form method="post">
<fieldset>
<ol>
<li>
<label for="name" id="name_label">Name</label>
<input id="name" type="" value="Your Name" name="name" class="text-input" />
<label class="error" for="name" id="name_error">This field is required.</label>
</li>
<li>
<label for="email" id="email_label">Email</label>
<input id="email" type="" value="Your Email" name="email" class="text-input" />
<label class="error" for="email" id="email_error">This field is required.</label>
</li>
<li>
<label for="phone" id="phone_label">Phone</label>
<input id="phone" type="" value="Your Phone" name="phone" class="text-input" />
<label class="error" for="name" id="phone_error">This field is required.</label>
</li>
<li>
<label for="comments" id="comments_label">Boston Brewery Booking Requested Date</label>
<textarea id="comments" type="" name="comments" class="text-input">Required Date</textarea>
<label class="error" for="comments" id="comments_error">This field is required.</label>
</li>
<li>
<button type="submit" name="submit" class="send" id="submit_btn" value="Send">Submit</button>
</li>
</ol>
</fieldset>
</form>
Your form and php works ok for me. I can't see a reason for it not to get the phone details.
What happens if you move the phone variable to the top of the stack (not that it should make any difference)
$phone = $_REQUEST['phone'] ;
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
Phone: $phone\n
Name: $name\n
Email: $email\n
Similar Messages
-
Contact form not accepting certain characters in the email box
Hi, i am currently using a flash template from flashmo.com and i have installed it etc... The problem i have is that when you go to send a message in the contact form you cannot enter certain characters in the email box, especially the '@' symbol, hw do i go about fixing this?
Thanks a lotfor each textfield you see in the ide, click it (to select it) and check the properties panel/embed fonts to make sure all characters needed in your app are checked.
-
Include calculated fields in the Infospoke
Hi all,
i need to include in the csv ouput of an Infospoke (data source is an ODS), some calculated fields not directly included in the ODS.
These fields are calculated using other infoobjects contained in the ODS.
Is this a way to calculate and include these fields in the csv output?
Tks in adv,
FedericoHI,
You can do this Calculation in the BADI Transformation. Write an ABAP code there to add a Calculated field to the downloaded file.
Regards, -
"Do not include a break inside the TD tag" is ignored
In Edit | Preferences | Code Format in DW CS5, the setting "Do not include a break inside the TD tag" is ticked but DW is still putting a line break in the tag like this...
<td> </td>
Any idea why the setting is being ignored?
MalcolmArtisan Internet wrote:
Both fair comments, many thanks. The reason I want to remove the space is because it's impossible to have an empty row with a height of less than about 6 pixels (used as a spacer or for coloured divider lines of different thicknesses) when there's a space within the TD tag. The space counts as a character which means that the row can't be less than the height of a character.
I know I could make a transparent spacer GIF, and create custom styles for different horizontal rules in the stylesheet, but it's always been a lot quicker to simply use a table row with a height.
Looks like I'll just have to carry on deleting the spaces from the code.
Malcolm
Your best solution is to insert a transparent spacer.gif and give it the dimensions you want. That will overrule all the 'empty' defaults. Please remember, the spacer need only be in one cell of the row. All other cells, unless they have larger content, will follow suit... applies to rows and columns.
(The 'height' attribute by itself, as you've discovered, is kind of dicey. So is the width.) -
Serbian characters are not included in most of the fonts in Adobe products and its bad for creativity. I wonder what can I do to change this? Where to start? Any advice?
Your kindness has inspired me to write this article
http://bzivkovicsavke.blogspot.com/2010/11/adobe-systems-incorporated-je-prijatelj.html
. Although we do not understand Serbian language, you can translate it into
Google.
Bojan Živković Savke
My profiles: <http://picasaweb.google.com/home>
Picasa<http://picasaweb.google.com/home>
<http://wiki.answers.com/Q/User:Savke>
Answers.com<http://wiki.answers.com/Q/User:Savke>
<http://bzivkovicsavke.blogspot.com/>
Blogger<http://bzivkovicsavke.blogspot.com/>
<http://www.creemaginet.com/sajt/blog/6302> Blog
RSS<http://www.creemaginet.com/sajt/blog/6302>
Contact me: image: Skype/ bojan-zivkovic
Signature powered by
<http://www.wisestamp.com/email-install?utm_source=extension&utm_medium=email&utm_campaign= footer>
WiseStamp<http://www.wisestamp.com/email-install?utm_source=extension&utm_medium=email&utm_campaign= footer>
2010/11/9 Chris Cox <[email protected]>
Yeah, most of those are not Adobe fonts and don't come with the Creative
Suite or Photoshop.
>
>
Right now, it appears that only our most recent fonts have complete Serbian
glyphs:
Garamond Premier Pro, Hypatia Sans Pro, Arno Pro, Minion Pro, Myriad Pro,
Sava Pro, and Warnock Pro.
>
Our type team has said that all of our fonts going forward will have
Serbian glyphs.
> -
Notes to vendor field of the PO header
We are creating a Drop ship PO from an Approved Requisition, using Auto create functionality. We want to populate the Notes to vendor field of the PO headers using the same Auto create functionality.We don't want to do that manually.
Please let us know how to do.My understanding is that Autocreate works on individual Requisition lines level and not on the entire Requisition. And therefore I can see in (PO_INTERFACE_S) package - AutoCreate PO package body the code copies the note_to_vendor from po_lines_interface table to po_lines_all table.
But if I understand your post correctly you want to copy the header level note_to_vendor on Requisition Headers to the note_to_vendor field on PO_HEADERS_ALL.
Can you confirm my understanding?
Thanks
Arun -
PHP forms submitted as an attachment rather than email?
How do I get my PHP forms submitted as an attachment rather than email?
Meaning, if I set up a form on my website and someone completes and submits it, how can I get the responses as an attachment rather than in email text?
Much appreciated.
GHi Gunter
I have spent so much time on this now.
I have tried to convert the php to an attached .txt or .csv file.
Learnt a lot but still can not seem to get the form data to be submitted as an attached file.
Here are two of my attempts, please assist:
<?php
$email=$_REQUEST['email'];
$firstName=$_REQUEST['firstName'];
$lastName=$_REQUEST['lastName'];
//The Attachment
$cr = "\n";
$data = "Email" . ',' . "First Name" . ',' . "Last Name" . $cr;
$data .= "$email" . ',' . "$firstName" . ',' . "$lastName" . $cr;
$fp = fopen('reservationTest.csv','a');
fwrite($fp,$data);
fclose($fp);
// Mail to
$email = "myemailaddress";
//subject
$subject = "Test Budget reservation";
//Header
$headers("Content-type: application/octet-stream");
$headers("Content-Disposition: attachment; filename=reservationTest.csv");
$headers("Pragma: no-cache");
$headers("Expires: 0");
//Message
$message = "".
"Email: $email" . "\n" .
"First Name: $firstName" . "\n" .
"Last Name: $lastName";
mail($email, $subject, $message, $headers);
?>
<html>
<body>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center">Guperman Your Test Message Has Been Submitted</div>
</td>
</tr>
</table>
</body>
</html>
EOD;
echo "$theResults";
OR
<?php
/* subject and email variables */
$email = $_POST['email'];
$lastname = $_POST['lastname'];
$firstname = $_POST['firstname'];
$to = 'myemailaddress';
$emailSubject = 'Test Form';
$headers = "From: $email\n";
$message = "A new reservation test.\n
Last Name</b>: $lastname
Name</b>: $firstname
Email</b>: $email
mail($to,$emailSubject,$headers,$message);
//open the file and choose the mode
$fh = fopen("reservationTest.txt", "a");
fwrite($fh, $email);
//close the file
fclose($fh);
?>
<html>
<body>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="center">Guperman Your Test Message Has Been Submitted</div>
</td>
</tr>
</table>
</body>
</html>
On both accounts when I test these files I get the following types of messages.
Warning: fopen(reservationTest.csv) [function.fopen]: failed to open stream: Permission denied in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 11
Warning: fwrite(): supplied argument is not a valid stream resource in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 12
Warning: fclose(): supplied argument is not a valid stream resource in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 13
Fatal error: Function name must be a string in \\HOSTING\DFS\20\1\9\1\2028751191\user\sites\mywebsite.com\www\reservationTest.php on line 22
And then to give the .php files permission I left click on the already uploaded files and try and set the permission to 777, but then I get a response like: Setting Access Properties failed for:
Your assistance is much appreciated. Regards -
On my iPad I have a working icloud that I have complete access to, but on my iPhone it keeps asking me for the password for it, but I do not know it! And the email that I used is not activated anymore! How do I delete the icloud account on my phone?
Hi Aurion23,
If you intend to keep using iCloud on your iPad, your best course of action would be to update your Apple ID/iCloud information so that you have a known password and it is associated with an active email address. You may find the following articles helpful:
iCloud: Change your iCloud password
http://support.apple.com/kb/ph2617
Apple ID: Changing your Apple ID
http://support.apple.com/kb/ht5621
Regards,
- Brenden -
can not verify apple id. The email on my itunes account is no longer good.
You can change it. At the top of iTunes, click Store > View My Account, log in with your password, View Account. To the right of your Apple ID click the word Edit, and it will take you to a page where you can edit your email address.
You are right to avoid creating a new account if at all possible, since having multiple accounts usually causes complications down the line. -
The email sent from macbook do not appear in my iphone and yahoo account
the email sent from macbook do not appear in my iphone and yahoo account
thanks for your help... I was feeling frustrated because the sync problem, but with your suggestion all contacts are now on my iPhone. _Thanks once again_.
I think that I was asking two different questions at the same time, because the problem with the iPhone synchronization was solved, but the .Mac Address Book still has no new contacts... just the contacts before the Mac OS X update to Leopard. I guess that I will need to look for help in other discussion topic. -
How can I attach a photo from iPhoto to mail as a file and not just put it on the email itself?
Souvent eu ce problème,
Je cree un dossier sur le bureau et glisse les photos à partir d'Iphoto dans ce dossier. Ce geste a pour effet de creer des copies dans le dossier.
Il ne reste plus qu'à selectionner ces photos pour les envoyer en pièces jointes. -
I submit podcast 37 hours after the in the itunes search not, and don't receive the email and feedback.
1、Apple account can submit a podcast, through the account information whether can view has been submitted a list, and a list of the corresponding state (such as: to review, through audit, audit not through).thanks!
2、 On a few weeks I submit a podcast less than 24 hours, didn't update, and my weekend update a consulting friends, their works are the fastest in three hours after the submitted to be updated. So I want to make sure that my podcast what is the state, whether to meet what problem. Excuse me.
3、Excuse me, the itouch "audio books" function, if want to let customers use itouch, in "audio books" checked to work, to submit works and works recipient, they should be how to operate and use apple's "audio books"?
(as works, I submit a M4b making as audio format, then submit to the itunes store, was collected, works as a listener, download M4b format works to the itouch, in "audio books" inside were able to see my work?) Thank you! -
could someone please tell me how to attach a document to email as an icon that opens....so it does not appear as text in the email??
Paste this into Terminal and hit return. If this attachment is text, it should work. Not sure about jpegs.
defaults write com.apple.mail DisableInlineAttachmentViewing 1
To reverse the setting, change the 1 to a 0. -
I am trying to create an itunes account on an ipad mini IOS 8.1. There doesn't seem to be a link to click 'I agree' to the terms and conditions on the email sent to me. Can anyone help? Thanks.
Create a NEW account/ID for her using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before. Make sure you specify a birthdate that results in being at least 13 years old
Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
More details of how:
http://ipadhelp.com/ipad-help-tips-tricks/how-to-get-free-apps-from-the-app-stor e-without-a-credit-card/ -
My iphone is stolen,but the email sent back didnt sent location of the iphone,would u please to check it for me.thanks
Just so you understand, this is not Apple. This is a user to user support forum. If you wish to contact Apple, you can do so here.
You can enable Lost Mode for the lost/stolen iPhone to access a array of features. If the iPhone is locatable when it is connected to the internet, then a location will appear on icloud.com/#find. For more information, visit here or contact Apple.
Maybe you are looking for
-
Error itunes is running in compatibily mode. The icon on the computer went bigger. And I known is not. That happens when upgrade. The icon on the computer went bigger. Please help.
-
I-Mac G5 Video Adapter Question
I have an I-Mac G5 17" and I am running Final Cut pro on it. I bought the video adapter so I can view the output on a television, but it only shows a mirror of my desktop. How do I make it only show the output which would be full screen of the video
-
How do I make Lightroom 4 run again?
Can I uninstal and reinstall, just putting in my serial number(s)? I have them ready to type in. It is the same computer. It will not start. I have Windows 7. Often things will crash, but usually they will restart. I had to power down when I had a lo
-
Oracle 10g web cache configuration issue
Dear all, we have two oracle 10g application 10.1.2.0.2 servers. which are configured sucessfully. forms are display from both servers. now we are configuring the web cache load balancing but are not able to configure. please help us. thanks in advan
-
Hello - can anyone tell me why my iPad (4th Gen) screen will no longer rotate. I don't have a screen lock symbol next to the battery icon. I have the rotate icon on my desktop but still can't get the screen to rotate.