FORM auth-method not working, it still gives a BASIC type pop-up box.

Hi All,
I'm trying to secure a web application running on Web As 7.  I created a login module stack and put it into web-j2ee-engine.xml along with the security role map...
<login-module-configuration>
          <login-module-stack>
               <login-module>
                    <login-module-name>EvaluateTicketLoginModule</login-module-name>
                    <flag>sufficient</flag>
                    <options>
                         <option>
                              <name>ume.configuration.active</name>
                              <value>true</value>
                         </option>
                    </options>
               </login-module>
               <login-module>
                    <login-module-name>BasicPasswordLoginModule</login-module-name>
                    <flag>requisite</flag>
               </login-module>
               <login-module>
                    <login-module-name>CreateTicketLoginModule</login-module-name>
                    <flag>optional</flag>
                    <options>
                         <option>
                         <name>ume.configuration.active</name>
                         <value>true</value>
                    </option>
               </options>
          </login-module>
     </login-module-stack>
     <password-change-config/>
</login-module-configuration>
<security-role-map>
          <role-name>AppEveryone</role-name>
          <server-role-name>all</server-role-name>
</security-role-map>
Then I added the auth-method, security-role, and security-constraint to the web.xml file...
<login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>AppRealm</realm-name>
</login-config>
<security-role>
    <description>AppEveryone</description>
    <role-name>AppEveryone</role-name>
  </security-role>
<security-constraint>
    <web-resource-collection>
      <web-resource-name>General access restriction</web-resource-name>
      <description>
      </description>
      <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <description>AppEveryone</description>
      <role-name>AppEveryone</role-name>
    </auth-constraint>
    <user-data-constraint>
      <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
</security-constraint>
... and everything works fine.  If the user allready has a logon ticket they get right into the application, and if they don't have a ticket, a standard web-browser dialogue box pops-up and asks for a username and password.  If they authenticate with the dialogue box, they are then given a logon ticket and sent to the application.
So now I want to use an html page rather than the dialog-pop-up box for entering the username and password.  So from what I can tell, I still need to use the BasicPasswordLoginModule but I need to change the login-config section of web.xml.
So I changed the <login-config> section of the web.xml to this...
<login-config>
    <auth-method>FORM</auth-method>
    <realm-name>AppRealm</realm-name>
    <form-login-config>
      <form-login-page>/login.html</form-login-page>
      <form-error-page>/error.html</form-error-page>
    </form-login-config>
</login-config>
I then created the login.html and error.html files and put them in the same directory as the .WAR file (I also put copies in the \root directory incase my path wasn't right).  They are as follows...
<b>login.html</b> -
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Login Test: Login Form</title>
</head>
Login Form
Welcome to the login page.
You will have to authenticate to get access to the secure area: <form method="POST" action="j_security_check"> Username: <input type="text" name="j_username">
Password: <input type="password" name="j_password">
<input type="submit" value="Login"> <input type="reset" value="Reset">
</form>
</html>
<b>error.html</b> -
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Login Test: Error logging in</title>
</head>
<body bgcolor="#FFFFFF">
Error Logging In...
I am sorry, you must have put in the wrong username/password.
</body>
</html>
But for whatever reason I'm still getting the browser pop-up box instead of my form when I try to access the application.  What am I doing wrong?  I am making all these changes after the app has been deployed, do these changes to the xml files need to be done during the build phase?  If anybody has any ideas please let me know... you will be rewarded.

The issue has been resolved.  There was no interesting work-a-round or fix involved.

Similar Messages

  • Is it still the case that the Muse CC Forms widget will not work properly unless you have Business Catalyst?

    I am looking into options for our next office website redesign.  We will definitely need a forms function.  I downloaded the Muse CC free trial and went through all of the tutorials.  The video on the forms (Contact Form) stated that the forms widget would not work or would not work properly if you do not have Business Catalyst.  I'm hoping that has changed since the video was created.
    Is this still true that you need to purchase the Business Catalyst product for Muse CC form widgets to work correcty??? 

    Piruki have you tried utilizing the Previous version option within the Creative Cloud Desktop application?  You can find additional details under the install Previous version section of CC desktop lists applications as "Up to Date" when not installed - http://helpx.adobe.com/creative-cloud/kb/aam-lists-removed-apps-date.html.

  • In dev server my payment advice form f110_prenum_chc  is not working

    hi,
    friends i need urgent help.
    1) i have copied f110_avis_in frm 000 client to 200 client with form name
       z_prenum_dup.
    2) i have copied f110_prenum_chc frm 000 client to 200 client form name
      zf110_prenum_chc1.
    3) then i modified my both forms in 200 saved assigned TRs and
    transported frm DEV server to PRD server(client 700).
    4)in dev server 200 client my both forms are working
      but in prd server 700 client my form cheque z_prenum_dup is
      working but payment advice form zf110_prenum_chc1 is
    not working.
    5) but i can see my both forms r their in 700 prd server in se71 t.code.
    6) if i run f-58 tr.code and by switching on debug mode i can see my
       cheque form but not payment advice form.
    7) if i run in 200 client i can see my both forms.
    can any body plz help me out of this issue.

    Dear,
       I will be able to put some points, if you can give me some more idea about ur problem,
    1, Does system giving any error..?
    2, Can you see a preview..?
      As I understood, it must not have any problem in transportation.
      You can also check with Respective functional consultant whether he has done with required customization in NACE..?
      One more thing you can do is,
      open a program RSNAST00 and put break point at "  PERFORM (tnapr-ronam) IN PROGRAM (tnapr-pgnam) USING returncode", here you can check at runtime ( While in debugging mode) the value of field TNAPR-FONAM, this value must be your SmartForm.  If it is not the case then, there is problem with NACE settings and contact your functional counterpart.
    Hope it's helpful .......Enjoy.
    Regards,
    Chetan

  • Infopath form load rule not working in browser forms but works on Client

    Hi
    I am working on an Infopath form and there are rules on form load. The form load checks for a value in a list, if the username() matches the one in the list, then the form would change its view.
    It works when I open it on client, but on the browser it fails.
    Have anyone encountered such an issue.

    Check below:
    http://stackoverflow.com/questions/16222681/infopath-rule-is-not-running-when-checking-sharepoint-list-field-value
    Ensure that "Include data for the active form only" was checked (I had to separate this field into another data connection because that box could not be checked for another field I was using), and
    Ensure that in the rule I was selecting from the "dataFields" folder under the data connection instead of "queryFields"
    http://sharepoint.stackexchange.com/questions/28554/infopath-form-load-rules-not-working
    if I edit the Infopath form on Infopath 2007, it seems that the rules for the load form will be visible if created.
    This look like a bug. Here are the steps below that will lead you to the bug:
    Step 1: Open the infopath form in Infopath 2010 and create 6 rules for Form Load and Save it as a file.
    Step 2: Open that infopath form that you created in Step 1 in InfoPath 2010 and go to the
    Form Load section. You will only see the first 5 rules. The 6th rules that you created for Step 1 will just "vanish". Now, close that infopath form.
    Step 3: Open that infopath form that you created in step 1 in InfoPath 2007 and select Tools > Form Option. In the
    Open and Save category, click the Rules button and add a new rule in it and save it.
    Step 4: Open that infopath form that you modify as describe in Step 3 in InfoPath 2010. That 6th rule will be visible.
    Therefore, there might be a bug in InfoPath 2010 that restrict Rules to a max of 5 in Form Load and thus if anyone open that form in SharePoint, only the first 5 rules will be executed.
    If this helped you resolve your issue, please mark it Answered

  • Apache bridge & Basic Auth does not work

     

    The WebLogic newsgroups are not the appropriate place to file product defect
    reports.
    I suggest that you file a bug report with our support organization. Be sure
    to include a complete test case. They will also need information from
    you -- please review our external support procedures:
    http://www.beasys.com/support/index.html
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    Jaroslav Mechacek <[email protected]> wrote in message
    news:[email protected]..
    >
    I tried mod_wl with apache 1.3.12 ( mod_ssl / openssl ) ,
    but the basic auth does not work.
    When apache starts it complains that mod_lw uses plain apache api
    Tue May 16 17:29:54 2000] [warn] Loaded DSO libexec/mod_wl.so uses plain
    Apache 1.3 API, this module might crash under EAPI! (please recompile it
    with -DEAPI)
    When I request protected page, apache returns both
    HTTP/1.1 200 OK , HTTP/1.1 401 Unauthorized
    what apache / ssl configurations are known to work ?
    Escape character is '^]'.
    GET /file/index.html HTTP1.0
    HTTP/1.1 200 OK
    Date: Tue, 16 May 2000 14:47:01 GMT
    Server: Apache/1.3.12 (Unix) mod_ssl/2.6.4 OpenSSL/0.9.5a
    HTTP/1.1 401 Unauthorized xxx:
    www-authenticate: Basic realm="WebLogic Server"
    content-length: 23
    content-type: text/html
    connection: Close
    No credentials supplied

  • I recently bought iphone6, My imessage and face time is not working and still it charged me for normal text message multiple times and still not able to authorise the usage. Let me know how I can start using the same.

    I recently bought iphone6, My imessage and face time is not working and still it charged me for normal text message multiple times and still not able to authorise the usage. Let me know how I can start using the same.

    Hello vinay34,
    If you are having issues with activating your Apple ID for FaceTime and iMessage, then take a look at the article below to get it sorted out. Make sure that you have the Date and Time set to Automatic as well as any other steps listed in the article. 
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/en-us/ts4268
    Regards,
    -Norm G. 

  • After Method not work

    Hello guys,
    I need your help.
    In activity step I added one method in "Methods AFTER Work Item Execution (Modal Call)", but this method not work after complete the workitem.
    This method run in background, and insert data in one table.
    My workflow use BUS1001006 object type, and this method too.
    Any idea?
    Thanks!!!
    Kleber

    Hi Arghadip!!!
    Now it's work fine!!! Thanks!!!
    Please... more one question...
    In my method, I need the value of the element <b>_Workitem.WorkitemStatus</b>.
    It's possible:
    ===========================================================
    swc_get_element container '<b>_Workitem.WorkitemStatus</b>' vl_status.
    ===========================================================
    or
    ===========================================================
    swc_get_element container '<b>_Workitem-WorkitemStatus</b>' vl_status.
    ===========================================================
    How I do this?
    Thank a lot!!!
    Kleber

  • Why my ipod touch 5g crashes, it does not work and the touch after a type is loaded and will be locked?

    why my ipod touch 5g crashes, it does not work and the touch after a type is loaded and will be locked?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:       
    iOS: How to back up           
    - Restore to factory settings/new iOS device.
    -  Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • My curser does not work in Pages.  I cannot type.

    My curser is not working in Pages.  I cannot type.

    Open a Word Processing document, sounds like you have opened a blank Layout template which has absolutely nothing to type into, you need to add Textboxes or Shapes.
    The Word Processing templates are labelled in the sidebar of the Template Chooser.
    Peter

  • Java Not Working, And Still No Answers. What Gives?

    Okay, decided to start this topic anew, since the only response I got to the other one was a post calling me "rude and impatient" (I guess that's what they're calling "persistence" nowadays..) , instead of...well...ignoring my admittedly pushy and harsh tone and actually being helpful. However, for the sake of it, I do apologize for my attitude in my last topic.
    But I digress, let's start off on a new foot, eh? On to the problem that is STILL at hand(in other words, "patience" hasn't gotten me jack, not even a "we don't know yet"):
    So last night (10 PM January 20th), the Firefox Plugin Checker said that my Java version was outdated. I also got a pop-up saying that my current version of Java at the time (Java 7 update 10) had vulnerabilities. So to try and fix this, I went to the Java page and downloaded the update (Java 7 update 11).
    To check and see if my update was working, I went to Java's check page, as well as another page I use. And here I discovered a problem. I got a notification that an old version of Java had been detected, and another prompt to download the current version (which I had already done). So I erased all versions of Java from my control panel, and tried to check it again. And when I did, I got this: http://oi50.tinypic.com/35b6xx2.jpg and http://oi47.tinypic.com/15fg37p.jpg.
    As you can see, both pages tell me that I need to install a missing plugin of some sort. So, thinking this would resolve the issue, I clicked the Install Missing Plugin button. This is what it told me was missing: http://oi45.tinypic.com/302uwbl.jpg. So I clicked next to install it.... and got this: http://oi45.tinypic.com/2cici0x.jpg, which I assume means that the plugin did not install. So I pressed Manual Install... and was lead/linked right back to the Java download page (where it all began, and what doesn't seem to be working in the first place)
    I go to check my plugins again (Just to make sure and also for extra information), and it appears to say that my Java version is current (is that what "Java Deployment Toolkit 7.0.110.21" is? I don't know, I am not good at technology at all. Either way, here is what it looks like: http://oi48.tinypic.com/4kxzz4.jpg). So...if it is current, why is it not working (i.e. I am unable to play games, DO MY COLLEGE CLASSWORK, or play Java-based games)?
    If it helps anything, here is what my control panel looks like in regards to Java right now: http://oi45.tinypic.com/2qlxu9t.jpg Am I missing anything that would make Java work?
    And before anyone says that Java is not essential: It may be that way to you, but I need Java to do classwork for college. Veterinary college.
    So, in short, what is going on with Java, and how can I fix it?
    EDITEDITEDIT: I Have found that I can do my classwork without Java. HOWEVER, this DOES NOT mean that the problem is solved or over with. I STILL WANT TO KNOW HOW TO FIX THIS PROBLEM AND GET JAVA TO WORK. Even if I never actually need it, I would still like to have a (working!!!) Java version because of two reasons: 1) I would rather have such a program and not need it, than need such a program and not have it, and 2) aesthetics. Sorry to say, but I am very particular about how things look when it comes to my belongings, and the fact that Java is messing up is making me actually stressed. In short, I still want the above issue solved, even if it's just purely for the sake of Peace Of Mind.
    Another note: I would (please!) appreciate a timely response on this matter. Even if the response is a "We don't know what the issue is and/or we are working to solve this issue.", that would satisfy me for the time being. I would just like a semi-timely response that would let me know that FF/contributors here have read the above and actually give a semblance of a care about their userbase.
    Thank You.

    '''ponyparty, '''
    The first prompt you see in Firefox to activate Java is because Java is currently on the Mozilla blocklist ( the "Hot Topic" article [[How to use Java if it's been blocked]] explains the reason for block and how to activate Java, including how to bypass the plugin activation prompt for trusted sites).
    cor-el is right about why you are seeing a second [http://oi48.tinypic.com/de8f8y.jpg Java "Security Warning"] when trying to view Java applets, that you have to click to run. This is a ''' Java''' security feature and not anything Firefox does.
    Try the same Java sites in Internet Explorer .... don't you also see the Java "Security Warning?" If you want to lower your Java security back to "Medium" in the Java Control Panel, see http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/jcp.html#security for details. That's up to you but I would leave it on "High " since Java 7 is still basically insecure, according to the reports I've seen and [https://blog.mozilla.org/security/2013/01/11/protecting-users-against-java-vulnerability/ this "Protecting Users Against Java Vulnerability]" Mozilla blog post.
    If the second Java prompt is your only remaining issue then your problem is really solved, since it is a new Java security feature and not anything in Firefox.
    Some background:<br>
    At the time I was helping you in the [https://support.mozilla.org/en-US/questions/944267 older thread you started] (now locked because you started this one) the solution to uninstall JavaFX wasn't known. On Dec 13th I wrote, ''There may be problems with Java 7 Update 10 since a number of Windows users have reported that Firefox is not detecting the plugin'' and I linked to a couple of related threads, including [http://forums.mozillazine.org/viewtopic.php?f=38&t=2628935 this MozillaZine thread], in which uninstalling JavaFX as a solution was posted 22 Dec 2012. On 25 Dec 2012 in the same MozillaZine thread, I posted a link to [https://bugzilla.mozilla.org/show_bug.cgi?id=820759#c12 this Dec 24th bugzilla comment] by an Oracle employee, who posted that uninstalling JavaFX was a solution for '''Oracle's''' Java 7 detection bug. Oracle has been working on the bug (to be fixed in an upcoming Java 7 release) and they created [https://www.java.com/en/download/help/firefox_java.xml this java.com help page], which is now included in the related MozillaZine and Mozilla Support articles on Java that I posted above.

  • Form Personalization is not working for copied Sales Orders

    Hi All,
    We have a requirement in Sales Order form, if the order type is "Standard" then Ship method field should be mandatory.
    We were able to do this using below form personalization, it is working for new order creation.
    When we did the below testing it is not working
    Inactivated the ship method and try to copy the order with Standard type the field remains mandatory and null but still it is allowing to book the Sales Order.
    Please help to sort out this issue, let me know if it is not clear
    Condition
    Trigger Event : WHEN-NEW-ITEM-INSTANCE
    Trigger Object: ORDER.SOLD_TO
    Condition:
    (:ORDER.ORDER_TYPE not like '%STANDARD%')
    Action
    Type : Property
    Object Type : Item
    Target Object : ORDER.SHIPPING_METHOD
    Property Name: REQUIRED
    Value: True
    Thanks,
    CSK

    Hi CSK,
    try it in well validate item trigger.
    If that order type is list then you may disable the field in WHEN LIST CHANGED  trigger itself.
    Hope it will work,
    Regards,
    Soofi

  • Multiple forms in JSF not working

    Hi
    I am using JSF 1.1 via WebSphere 6.1 and am having problems with multiple forms in a jsf page. I have a search command button on the page and a bunch of command links in a datatable. I have a h:form for the command button and another h:form for the datatable.
    The command button works fine. But the links don't. They just show the same page again and the action behind the commandLink is never called. I see many posts from way back about multiple forms not working in a jsf page.
    Is there a fix or workaround to this problem?
    Any pointers would be much appreciated.

    All replies so far have focused on solving multiple form issues. I have no problem with multiple forms per page but exactly like the original poster I can not get my h:commandLinks to work when embedded in a h:datatable.
    I have command buttons before and after the data table working great, but for whatever reason command links just do a post back to the backing bean.
    At this point I am not even trying to process data, just verify the action method is being executed.
    Another item of note, the links will always post to the same bean regardless of what bean is referenced in action="...."
    Any ideas?
    Message was edited by:
    jasontc
    It appears once the page is rendered for the first time any future rendering will display the link(s) but the link(s) will be junk.
    I ran a test with a pre populated ArrayList for my datatable, link worked. I then reload the datatable with a different ArrayList and the link is still referencing the original item in the list. So the action method I want to call is called but the .getRowData is incorrect. In addition of the number of items in my list grows the links become junk beyond the original size of the list.

  • Web Auth page not working on WLC

    I have a WLC 4402 and I upgraded the s/w from 4.1 to 4.2.176 since I did the web auth on my Guest wlan does not work. I can connect to the wireless ok and when I type in a web address I should get the web auth page but I just get "This page cannot be displayed". However if i type in the ip address of the WLC in the addrsss bar I get the web auth page and it work fine form then on. The web auth page worked fine on ver 4.1. Any ideas?

    I opened a TAC case this morning on this same problem, and my solution is what is listed above (config network secureweb cipher-option sslv2 enable)
    Basically, SSLv2 is disabled in 4.2. The Default is now SSLv3.
    Depending on your Internet settings, if IE is configured to use SSLv2, the webpage will not work.
    So in internet explorer, tools, internet options, advanced, There will be a checkbox next to Use SSLv2. (Even if Use SSLv3 is enabled, you still have the https issue).
    Basically, my issues was that a select few users could not Web authenticate and a select few admins couldn't HTTPS manage the GUI. Turns out in all cases, the computers that were all able to work, did not have SSLv2 enabled.
    By enabling SSLv2, all affected users now work (I think).

  • LV2012 Web Services w/ NI Auth login not working w/ static files in Firefox 19

    Hi!
    I followed this procedure to password protect my web service and the static files. 
    http://digital.ni.com/public.nsf/allkb/DF41D5DA8EEB4840862577D90058C208
    When testing it out with my web service it seems to work fine on any web browser.  http://localhost:8080/add/add/1/2 first will present a login.  Once the user is logged in the page refreshes and the results of the operation are shown.  http://localhost:8080/logout works as well.
    I followed the procedure in the FAQ to include an index.html file.
    http://www.ni.com/white-paper/7747/en#toc15
    When I try to access the page (via http:localhost:8080/add/web/index.html) I'm greeted with the National Instruments login screen.  I enter my credentials and in Chrome and Internet Explorer the screen refreshes and I see my html file.  In Firefox it hangs for awhile on the authentication screen and then reloads back to the authenticaiton screen (as if the username and password did not take).
    Attached are my files.  If you want to try and recreate this please follow this procedure:
    * Unzip the attached project to a folder
    * Open the project in LabVIEW 2012
    * Check the properties of the web service to ensure that the build paths are correct
    * Follow the procedure above for setting up NI Auth on your web service and adding the "testpermission2" permission.  Be sure to remove "Everyone" from that "testpermission2" or you will never see a login prompt.
    * Build/Deploy the web service
    * open http://localhost:8080/logout to ensure that you are not currently authenticated
    * open http://localhost:8080/add/add/1/2 and login, observe behavior
    * open http://localhost:8080/add/web/index.html you should still be logged in so you will see the "Hello World!" just fine
    * open http://localhost:8080/logout to log back out
    * open http://localhost:8080/add/web/index.html and see if you are able to login.
    I've tried disabelling my plugins in Firefox and still have this problem.  I'm really scratching my head on how to overcome this other than throwing away NI Auth and use something else.  My web service is going to run off of a static front end driven by javascript and html.  So the access point will be the html file.  I need to have some username and password scheme worked out.  I also need to be able to see what user is currently logged in with my Web Service VIs (does anyone know if that is possible with NI Auth)? 
    The other BIG issue I have with NI Auth is that it requires Silverlight.  So much for mobile support, eh?  Anyone know of a good plug-and-play alternative so I don't have to reinvent the wheel?  I guess I could impliment some kind of token system on my web service side.
    In the meantime, getting NI Auth to properly work with Firefox would help.
    Thanks for your input,
    -Nic
    Attachments:
    Example Web Service.zip ‏15 KB

    Disclaimer: I in no way mean to bash NI and I have used NI Auth myself in the past
    If you are going to go to the trouble of abstracting NI Auth, I would recommend instead investing your time in your own authentication scheme (or implementing a standard scheme in LV).
    NI Auth is great and works for low security applications where you just don't want people fooling around with your application who shouldn't be.
    However, NI Auth is really not that secure.  If I remember correctly, the username is transmitted in plain text and I don't think the encryption algorithm is that sophisticated.  It is nice that it's already integrated into LV, but there really are very few features at this time.
    If you want something to be really secure, you need to take measures beyond what NI Auth provides and before you go to the work of building abstraction on top of a basic and somewhat shaky protocol, I'd seriously consider implementing a more stable base.
    <insert 2 cents complete>
    Chris
    Certified LabVIEW Architect
    Certified TestStand Architect

  • PHP email form with Validation - not working

    Hello;
    I am new to using php. I usually use coldfusion or asp but this site requires me to write in php. I have a form I am trying to get to work and right now.. it doesn't do anyhting but remember what you put in the fields. It doesn't want to send, and it won't execute the validation script for the fields that are required. Can anyone help me make this work? I'm confused and a definate newbie to PHP.
    Here is my code:
    <?php    
                  $PHP_SELF = $_SERVER['PHP_SELF'];   
                  $errName    = "";   
                  $errEmail    = "";
                  $errPhone    = "";        
                  if(isset($_POST['submit'])) {        
                          if($_POST["ac"]=="login"){            
                        $FORMOK = TRUE;    // $FORMOK acts as a flag. If you enter any of the conditionals below,                             // it gets set to FALSE, and the e-mail will not be sent.
                        // First Name           
                        if(preg_match("/^[a-zA-Z -]+$/", $_POST["name"]) === 0) {               
                            $errName = '<div class="errtext">Please enter you name.</div>';               
                            $FORMOK = FALSE;           
                        // Email           
                    if(preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/", $_POST["email"]) === 0) {                                                    $errEmail = '<div class="errtext">Please enter a valid email.</div>';               
                            $FORMOK = FALSE;           
                        // Phone           
                        if(preg_match("/^[a-zA-Z -]+$/", $_POST["phone"]) === 0) {               
                            $errPhone = '<div class="errtext">Please enter your phone number.</div>';               
                            $FORMOK = FALSE;           
                        if($FORMOK) {               
                                $to = "[email protected]";  
                                $subject = "my. - Contact Form";                  
                                $name_field = $_POST['name'];               
                                $email_field = $_POST['email'];               
                                $phone_field = $_POST['phone'];
                                $city_field = $_POST['city'];
                                $state_field = $_POST['state'];               
                                $message = $_POST['comment'];                
                                $message = "               
                                Name: $name_field               
                                Email: $email_field
                                Phone: $phone_field   
                                City: $city_field   
                                State: $state_field               
                                Message: $message";                
                                $headers  = 'MIME-Version: 1.0' . "\r\n";               
                                $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";                
                                // Additional headers               
                                $headers .= 'To: <[email protected]>' . "\r\n";               
                                $headers .= '[From] <$email_field>' . "\r\n";                
                                // Mail it               
                                mail($to, $subject, $message, $headers);                
                                header("Location: thankyou.php")
                                // I have no idea what these next 3 lines are for. You may just want to get rid of them.                   
    ini_set("sendmail_from","[Send from]");
    ini_set("SMTP","[mail server]");
    mail($to, $subject, $message, $headers);
                                } else {               
                                echo "Error!";              
                        ?>
    <form method="post" action="<?php $PHP_SELF ?>" id="commentForm">
    <input name="name" size="40" value="<?php echo $_POST["name"]; ?>" type="text">
                         <?php  if(isset($errName)) echo $errName; ?>
    <input name="email" size="40" value="<?php echo $_POST["email"]; ?>"  type="text">
            <?php  if(isset($errEmail)) echo $errEmail; ?>
    <input name="phone" size="40" value="<?php echo $_POST["phone"]; ?>" type="text" id="phone">
            <?php  if(isset($errPhone)) echo $errPhone; ?>
    <input name="city" size="40" value="<?php echo $_POST["city"]; ?>" type="text" id="city">
    <input name="state" size="40" value="<?php echo $_POST["state"]; ?>" type="text" id="state">
    <textarea name="comment" cols="30" rows="10" id="comment"><?php echo $_POST["comment"]; ?></textarea>
    <input type="submit" value="Submit" name="submit" class="contact-submit" />
    </form>
    It seems pretty simple.. but it's not working at all. I would also like this page to submit to it's self, and when it actually does send an email, to just make the form disappear and replace it with the thank you text instead of sending you to another page. I also do not need to use an smtp server, it goes directly to the network server when sent.
    I'm really sorry to ask all of this, I'm trying to learn this language and need to make this work.
    Thank you for anyones help in advance.

    .oO(BarryGBrown)
    > I have a php file which generates an email from a form
    in a website I have
    >designed. I just want to make some areas of the final
    generated email in bold
    >text. I know if people have plain text only selected in
    their email client they
    >won't see the bold text, but at least it will reach a
    certain percentage of
    >users.
    You can't do bold text in a normal email. Plain text is just
    that -
    plain text. For anything more you need HTML. _If_ you should
    need it.
    Usually plain text serves pretty well and is the most
    efficient way.
    > the line in question is -
    >
    > $body ="Booking request details from website:\n\n";
    >
    > I have tried putting  and ,
    syntax is used in some forum software, but besides that it
    has
    no meaning whatsoever.
    >inside the inverted commas, outside
    >etc, plus tried different declarations within the
    <head>, nothing works! What
    >am I doing wrong?
    You would have to create an entire HTML email with all the
    required
    headers and boundaries. Quite difficult to do by hand with
    PHP's mail()
    function.
    > I am a beginner with this php stuff, please be kind!
    Then you should start simple with plain text. There are some
    classes out
    there which make it easy to generate text and HTML emails
    (phpmailer for
    example), but you should be familiar with PHP coding if you
    want to use
    them.
    Micha

Maybe you are looking for