Simple Form Problem: Cant press Enter in form without getting error message: Invalid Input

The problem is very simple,
I have several forms on my site such as the 'quick enquiry'
form on the home page about half way down.
http://www.party-invitation.co.uk/index.htm
The user enters name- Works Fine
user enters email address- Works Fine
User enters a question- This is were the problem occurs when
the users presses the Enter key. This seems to bring up a message
that says Invalid Input.
Does anyone know how i can allow people to use the Enter key
in my forms to skip lines without causing this error message?
Any help would be appreciated.
Feel free to use the form to test it out.
Thanks.
Here is my php code for the form.
<?
function checkOK($field)
if (eregi("\r",$field) || eregi("\n",$field)){
die("Invalid Input!");
$Name=$_POST['Name'];
checkOK($Name);
$Email=$_POST['Email'];
checkOK($Email);
$Question=$_POST['Question'];
checkOK($Question);
$to="[email protected]";
$message="
A Quick Enquiry has been submitted from
www.Party-Invitation.co.uk
Here are the details:
Name: $Name
Email: $Email
Question: $Question
if(mail($to,"Quick Enquiry: $Email $Name" ,$message,"From:
$email\n")) {
echo "";
} else {
echo; "There was a problem sending the mail. Please check
that you filled in the form correctly.";
?>

.oO(stuckinthesystem)
> Here is my php code for the form.
> <?
This should be <?php for portability reasons. Short open
tags are an
optional feature and can be disabled.
> function checkOK($field)
> {
> if (eregi("\r",$field) || eregi("\n",$field)){
The old ereg_* functions should not be used anymore. Better
would be
something like
if (preg_match("/[\n\r]/", $field)) {...}
> $Name=$_POST['Name'];
> checkOK($Name);
> $Email=$_POST['Email'];
> checkOK($Email);
> $Question=$_POST['Question'];
> checkOK($Question);
The last check causes the error if the user enters multiple
lines in the
text area. You can remove that check, because line breaks in
the email
body are safe.
> if(mail($to,"Quick Enquiry: $Email $Name"
,$message,"From: $email\n")) {
> echo "";
There's a typo in the last parameter. Variable names in PHP
are
case-sensitive, so $Email != $email. You should set
error_reporting to
E_ALL in your php.ini, so PHP will let you know about such
errors.
Micha

Similar Messages

  • Unable to email a document.  Keep getting error message:  Invalid Date Enter 2-digit month

    Unable to email a document.  Keep getting error message:  Invalid Date Enter 2-digit month
    Does not happen with all forms which emante from same USG webpage
    Any adivice?

    If i am using 11G andrtp is 11g but on rtp side if they configure SSL, is it mandatory to do it from our side also?No it not mandatory to enable SSL at your end however you have to configure identity and trsut at your end.
    Any update on my regular question(The main forum question)?You mentioned that you are posting message from 10g to 11g and as per log you are sending it to URL - https://dev-nog.server:443/b2b/transportServlet
    So few things which I see as a problem are-
    1. You should use URL https://hostname:soa_server_ssl_port/b2b/httpReceiver instead of https://dev-nog.server:443/b2b/transportServlet
    2. SOA server SSL port should be enabled (SSL should be enabled on SOA server)
    3. You should configure wallet at 10g side to contain trust cert of 11g server
    Regards,
    Anuj

  • Why cant i complete iTunes transactions without receiving error messages etc.?

    Why cant i complete iTunes transactions without receiving error messages etc.?

    We are fellow users here on these forums, we won't know unless you tell us what the error messages etc are.
    If you are getting a message to contact iTunes Support then you can do so via this link and ask them why the message is appearing (we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's a different error message ... ?

  • Cannot complete email client form, keep getting error message "Invalid credentials check email and password"

    I have Elements and Premier Photoshop 8 on my windows 7, 64 bit, computer.  I just downloaded the upgrade to #13 for both.  The Elements downloaded ok and transferred pictures from #8.  My problem is that on 13 I cannot configure an email client so I can email my photos to other people.  When I fill out the configure email client form I get an error message that says "Invalid credentials Please check your email address and password and try again"  I did that and continued to receive the same error message. I entered the email address and password I use to get into my adobe account.  How can I solve this problem?

    Hi,
    In the organizer, in the Preferences -> Email, the email address and password is not your Adobe Id, it should be your mail service provider - it could be a Microsoft Account or a Gmail.
    When you normally use emails, you must have an email account with a password - use that.
    If you have to use the "other" type of service provider, it needs to be configured for the SMTP service.
    Brian

  • There was a problem connecting to the server. - Keeps getting error message.

    Eversince I updated my iMac to 10.7.3 I get this message every 5 minutes.
    "There was a problem connecting to the server.
    That server was gone for almost 1 month now.
    I have checked Login items, launchdaemons, startup items pretty much gone to every website and I cannot get this error message go away.
    Please help..

    That server was Microsoft Server 2003.
    My users used that server and to access our resources files and folers.
    But, I retired that server 1 month ago and all of the sudden her iMac just trying wanted to connect to that server.
    I have also clear her history of server by just going to command+k and clear history servers.

  • Cant sign in any help i get error message.?

    cant anyone help solve the error mesdsage what i get in app store it wont le me sign in help me please ?

    Disable anti virus software if installed
    Make sure the firewall is turned off in System Preferences > Security & Privacy > Firewall
    Make sure Gatekeeper is enabled
    Open System Preferences > Security & Privacy then select the General tab.
    Make sure either Mac App Store or Mac App Store and identified developers is selected. If that area is grayed out, click the padlock icon to proceed.
    OS X: About Gatekeeper

  • I am trying to send a text message from my iPad when I enter phone number I get error message phone number not registered with iMessages  from contacts

    When attempting to send text message from iPad I get error message "phone number not registered with iMessage REMOVE" the number is for iPhone an includes area code and country code. How do u register a number with iMessage?.

    TestnTag wrote:
    When attempting to send text message from iPad I get error message "phone number not registered with iMessage REMOVE" the number is for iPhone an includes area code and country code. How do u register a number with iMessage?.
    The iPad is not capable of sending an SMS message so texts, pictures, etc., must go through iMessage.  The destination device must be registered with the Apple servers by turning on iMessage.  Therefore, the user with the iPhone must enable it for iMessage.

  • Having problems updating to 5.0.1 keep getting error message

    I have tired muliple times to download this new "version" and keep getting an error message. this has happen the past two days. I am really getting tired of this. I have even deleted itunes and downloaded it again. what the point in having this phone if the updates dont work.

    Good Afternoon poolkitty,
    I am sorry to hear of the difficulties you are experiencing in attempting to update the software on your iPhone 4. Although you can complete the update via wi-fi, we recommend completing the update using iTunes, as this is the preferred option. The link attached below includes both options.
    http://bit.ly/ul3LXl
    I hope you find this information helpful.
    Sincerely,
      JonathanK_VZW
    VZW Support
    Follow Us on Twitter@VZWSupport

  • Both my iPad and iPhone have ios8 On either device in Calendars edit shared with add person when I enter an email address and press add nothing happens - just goes back to edit screen and what I have entered has gone. No error message or any clue

    Both my iPad and iPhone have ios8
    On either device in Calendars> edit >shared with> add person when I enter an email address and press add nothing happens - just goes back to edit screen and what I have entered has gone. No error message or any clue about why I cant share my calendar. Please help.

    UDPATE:
    Spoke with Express lane, and issue was escalated.  Kudos to the support guys that handled this one (Brian and Yi).  Went through everything in detail and took all the crash dumps off the iphones and ipads to send to engineering.
    After backing up the contacts, the recommendation was to delete all contacts in  iCloud.  Doing that caused my iCloud to crash (in the browser), so more crash dumps were sent to apple.
    Eventually got all contacts deleted, then did a resync.  Looks like IOS devices are coming back to life and syncing again.
    Also, Outlook iCloud connector has just been updated to ver 1.0.1 so i installed that on their recommendation.
    BOTTOM LINE workaround:
    1. Backup contacts
    2. Delete contacts in iCloud
    3. Delete accounts on IOS devices
    4. Recreate accounts on IOS devices.
    Hoping a real root cause can be found and real fix implemented.  This has caused me to doubt the stability of iCloud, so i will procees with caution.

  • IPhone 4S, the last two versions of IOS: I receive an text, reply, get error message instructing me to use valid 10 digit number. Only this person. I've deleted and re-entered her contact info - still cant send txt. What's up?

    Seems I entered question in subject field? Here's the question:
    iPhone 4S, the last two versions of IOS: I receive a text, in iMessage, reply, get error message instructing me to use valid 10 digit number. Only this person. I've deleted and re-entered her contact info - still cant send txt. What's up? ATT says they've never seen this. I have previously texted successfully with this person and she's changed nothing on her end.

    The fix for this problem is easy and is set out here: http://edctips.blogspot.com/2014/09/fixing-iphone-texting-problem.html

  • HT204053 In iCloud setup my apple I'd is not accepting. Getting error message it should be  an email I'd, but my my apple Id is just in user I'd form? Please support.

    In iCloud setup my apple I'd is not accepting. Getting error message it should be  an email I'd, but my my apple Id is just in user I'd form? Please support.

    I've tried both. First, I tried on my pc, where iTunes had installed iCloud when it last updated. I have iTunes installed on this computer (and on my iPad and iPhone), but that wasn't the issue.
    So I went online, thinking I needed a separate iCloud Apple ID, but it prompted me for my current Apple ID and gave me the message about my ID being "valid" but not an iCloud account," which, lol, was what it had asked me to do in order to create one. I checked, and at least one other user is having the same issue. I'll attempt to copy/paste the Support request url: https://discussions.apple.com/thread/4430653?tstart=0
    Thank you for any help you can give.
    Trish

  • Form Error Message: Invalid relation attribute on pageSet xfa

    Hi,
    I've developed a form that many folks are using without any issues. However, I do have a small number of users that get the following error message when opening the form.
    Error Message:  Invalid relation attribute on pageSet xfa[0].template[0].form1[0].#pageSet[0]
    This error only appears to come up if they are using Adobe Acrobat Pro Version 8. No issues on versions 9 or 10 (X). The form is suppose to be compatible back to version 7.
    My main form is called (form1). Then there are 4 major sub forms under (form1), The top drop down (on the masterpage) hides or displays one of the major sub forms based on user selection.
    I have a hunch that something with the generated code not jiving well with Acrobat 8.
    Here's a snippet of the code if you'd like to look through it.
    form1.#pageSet[0].MasterPage1.FormActionDropDown::change - (JavaScript, client)
    //+ GENERATED - DO NOT EDIT (ID:D2FF16C4-6D1F-45D4-ACB7-0DB7CE14229F CRC:3650232787)
    //+ Type: Action
    //+ Result4: SetPresence("$Node5","hidden")
    //+ Result3: SetPresence("$Node4","visible")
    //+ Result2: SetPresence("$Node3","hidden")
    //+ Result1: SetPresence("$Node2","hidden")
    //+ Node5: form1[0].ChangePAForm[0]
    //+ Node4: form1[0].Non-PAForm[0]
    //+ Node3: form1[0].DeletePAForm[0]
    //+ Node2: form1[0].PAForm[0]
    //+ Node1: form1[0].#pageSet[0].MasterPage1[0].FormActionDropDown[0]
    //+ Condition1: ListField("$Node1","textselected","ADD NON-PA User")
    //+ ActionName: DropDown.change.NonPA
    if ($.boundItem(xfa.event.newText) == "ADD NON-PA User") {
      this.resolveNode("PAForm").presence = "hidden";
      this.resolveNode("DeletePAForm").presence = "hidden";
      this.resolveNode("Non-PAForm").presence = "visible";
      this.resolveNode("ChangePAForm").presence = "hidden";
    //+ GENERATED - DO NOT EDIT (ID:662A28BD-A30A-4E6D-92CD-6FF22B0EFB5D CRC:2945493746)
    //+ Type: Action
    //+ Result4: SetPresence("$Node5","hidden")
    //+ Result3: SetPresence("$Node4","hidden")
    //+ Result2: SetPresence("$Node3","visible")
    //+ Result1: SetPresence("$Node2","hidden")
    //+ Node5: form1[0].ChangePAForm[0]
    //+ Node4: form1[0].Non-PAForm[0]
    //+ Node3: form1[0].DeletePAForm[0]
    //+ Node2: form1[0].PAForm[0]
    //+ Node1: form1[0].#pageSet[0].MasterPage1[0].FormActionDropDown[0]
    //+ Condition1: ListField("$Node1","textselected","DELETE EXISTING PA")
    //+ ActionName: DropDown.change.DeletePA
    if ($.boundItem(xfa.event.newText) == "DELETE EXISTING PA") {
      this.resolveNode("PAForm").presence = "hidden";
      this.resolveNode("DeletePAForm").presence = "visible";
      this.resolveNode("Non-PAForm").presence = "hidden";
      this.resolveNode("ChangePAForm").presence = "hidden";
    //+ GENERATED - DO NOT EDIT (ID:66B7091F-75C5-4A73-8ACA-885AE42D0308 CRC:2169512649)
    //+ Type: Action
    //+ Result4: SetPresence("$Node5","visible")
    //+ Result3: SetPresence("$Node4","hidden")
    //+ Result2: SetPresence("$Node3","hidden")
    //+ Result1: SetPresence("$Node2","hidden")
    //+ Node5: form1[0].ChangePAForm[0]
    //+ Node4: form1[0].Non-PAForm[0]
    //+ Node3: form1[0].DeletePAForm[0]
    //+ Node2: form1[0].PAForm[0]
    //+ Node1: form1[0].#pageSet[0].MasterPage1[0].FormActionDropDown[0]
    //+ Condition1: ListField("$Node1","textselected","CHANGE / MODIFY EXISTING PA")
    //+ ActionName: DropDown.change.ChangePa
    if ($.boundItem(xfa.event.newText) == "CHANGE / MODIFY EXISTING PA") {
      this.resolveNode("PAForm").presence = "hidden";
      this.resolveNode("DeletePAForm").presence = "hidden";
      this.resolveNode("Non-PAForm").presence = "hidden";
      this.resolveNode("ChangePAForm").presence = "visible";
    //+ GENERATED - DO NOT EDIT (ID:C87B58DB-765D-426C-81BB-5A7ECFF42B63 CRC:2949030955)
    //+ Type: Action
    //+ Result4: SetPresence("$Node5","hidden")
    //+ Result3: SetPresence("$Node4","hidden")
    //+ Result2: SetPresence("$Node3","hidden")
    //+ Result1: SetPresence("$Node2","visible")
    //+ Node5: form1[0].ChangePAForm[0]
    //+ Node4: form1[0].Non-PAForm[0]
    //+ Node3: form1[0].DeletePAForm[0]
    //+ Node2: form1[0].PAForm[0]
    //+ Node1: form1[0].#pageSet[0].MasterPage1[0].FormActionDropDown[0]
    //+ Condition1: ListField("$Node1","textselected","CREATE NEW PA")
    //+ ActionName: DropDown.change.NewPA
    if ($.boundItem(xfa.event.newText) == "CREATE NEW PA") {
      this.resolveNode("PAForm").presence = "visible";
      this.resolveNode("DeletePAForm").presence = "hidden";
      this.resolveNode("Non-PAForm").presence = "hidden";
      this.resolveNode("ChangePAForm").presence = "hidden";

    You should post this question in the LiveCycle Designer forum here. This forum is for forms created in Acrobat (Acroforms).

  • Music purchased on ipad wont play on computer. I get a message which says that the computer is not authorised to play the track but when I enter the password I get the message saying that the computer is already authorised. I have the opposite problem tra

    Music purchased on ipad wont play on computer. I get a message which says that the computer is not authorised to play the track but when I enter the password I get the message saying that the computer is already authorised. I have the opposite problem transfering some but not all music from computer to ipad.  Can anyone help?

    Interesting. Maybe it is more of a DRM issue than an Apple ID ownership issue. There is actually an iTunes Support section here on the discussion boards. If you wish to continue troubleshooting, you might post your question over there and refer to this discussion thread. You can also contact someone in Apple iTunes Support.

  • HT1923 I cant update or remove itunes without receiving the message:  the install source (itunes.msi) for this product is not available. verify that the source exist and that you can access it.   Has anyone had this problem? Thanks

    I cant update or remove itunes without receiving the message:  the install source (itunes.msi) for this product is not available. verify that the source exist and that you can access it.   Has anyone had this problem? Thanks

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Cant restart my ipad, ill get error message 9006

    cant restart my ipad when connected to my PC, i get error message 9006

    kristina
    not really enough info. I'll ask a couple of questions but when you reply, keep the following in mind...
    Quoted from  Apple's "How to write a good question"
       To help other members answer your question, give as many details as you can.
    Include your product name and specs such as processor speed, memory, and storage capacity. Please do not include your Serial Number, IMEI, MEID, or other personal information.
    Provide the version numbers of your operating system and relevant applications, for example "iOS 6.0.3" or "iPhoto 9.1.2".
    Describe the problem, and include any details about what seems to cause it.
    List any troubleshooting steps you've already tried, or temporary fixes you've discovered.
    From ChitlinsCC: "Keep It Short and Simple" - Take your time...
    Questions...
    can you operate your iPad normally on its own?
    is iOS 7 correct, or have you updated to iOS 8x?
    can you describe exactly what actions you take up until you get the error 9006, especially exactly the entire error message, verbatim... and what App/OS seems to generating it?
    Additionally, I will ask our Hosts to move your question to the iPad forum for a better response.
    regards
    CCC

Maybe you are looking for