Jump to content

Freedom1

Member
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Freedom1

  1. I fear I may have led you down the garden path. The form is actually Javascript. Here is the html. There is no "action" tag. Is this form poorly coded then, or more sophisticated than the usual?

     

    <div class="container1">

    <div class="col-5">

    <div class="h3"><input type="text" onblur="if(this.value=='') this.value='Name:'" onfocus="if(this.value =='Name:' ) this.value=''" value="Name" /></div>

    <div class="h3"><input type="text" onblur="if(this.value=='') this.value='E-mail:'" onfocus="if(this.value =='E-mail:' ) this.value=''" value="Email" /></div>

    <div class="h3"><input type="text" onblur="if(this.value=='') this.value='Phn:'" onfocus="if(this.value =='FAX:' ) this.value=''" value="Phn" /></div>

    </div>

    <div class="col-6">

    <textarea rows="40" cols="30" onblur="if(this.value=='') this.value='Message:'" onfocus="if(this.value =='Message:' ) this.value=''" >Message</textarea>

     

    </div>

    <br class="clear" />

    </div>

    </div>

    </div>

    <br class="clear" />

    </div>

    </div>

    </div>

    </div>

    </div>

    <div class="left-bottom-corner png">

    <div class="right-bottom-corner png">

    <div class="border-bottom png"><div class="pa indent4"></div><div class="container"><a href="#" class="link-2" onclick="document.getElementById('form').submit()"><em><b>Submit</b></em></a></div></div>

    </div>

    </div>

    </div>

    </div>

    </form>

    </div>

  2. There are two videos here:-

    http://www.killersites.com/university/

    under Beginners PHP - Processing Forms with PHP

     

    You don't have to edit the html form at all except to change the action to a php url to process the form, like

    <form method="post" action="sendmail.php">
    

    The form input tags should already have name="...".

    All you need to add is the separate php processing file.

     

    You may have to give the html file with the form a .php extension, but only if there is php processing to do on the page, which may not be the case. The form itself doesn't need php processing on the page unless the php in the action is to php code on the same page. If the processing is to a separate php file then the form page can still have a .html extension.

     

    See also http://www.wickham43.net/formemail.php (which is just the basics. You probably need extra security code), or use a script from

    http://www.jemjabella.co.uk/php-scripts-php-mail-form

    http://www.formmail.com/

    http://www.email-form.com/

  3. I've started my own web hosting company so I have my own server, that is I pay for the space. I've uploaded the PHP file to a subdomain I created for the website. Thanks for thinking about it though.

  4. How are you trying to process the PHP?

    You can't process PHP on your computer from a local php file unless you have a server (WampServer 2 or XAMPP) on your PC which incorporates Apache. You then put all the files into a special folder which the local server operates (C:\wamp\www folder for WampServer).

     

    If you have uploaded your php file to your host and it still doesn't work online, does your hosting service support PHP?

  5. Thanks, I've been trying to do as you suggested, but I'm sure it's something I am not getting right with the code. I'll keep hacking away at it. I should learn a lot about this by the trial and error method!

  6. There are two videos here:-

    http://www.killersites.com/university/

    under Beginners PHP - Processing Forms with PHP

     

    You don't have to edit the html form at all except to change the action to a php url to process the form, like

    <form method="post" action="sendmail.php">
    

    The form input tags should already have name="...".

    All you need to add is the separate php processing file.

     

    You may have to give the html file with the form a .php extension, but only if there is php processing to do on the page, which may not be the case. The form itself doesn't need php processing on the page unless the php in the action is to php code on the same page. If the processing is to a separate php file then the form page can still have a .html extension.

     

    See also http://www.wickham43.net/formemail.php (which is just the basics. You probably need extra security code), or use a script from

    http://www.jemjabella.co.uk/php-scripts-php-mail-form

    http://www.formmail.com/

    http://www.email-form.com/

  7. How about making a video showing an example of using php with a contact form that is already in a website template? I won't be creating many forms from scratch, since I plan to use ready made website templates, but I'm having trouble deciphering just how to incorporate php into an existing form to make it work. One example would be helpful. Thanks.

  8. CoffeeCup has the facility to change the Initial DOCTYPE.

     

    Look in Tools > Preferences > General > Initial DOCTYPE.

     

    I had a play with CoffeeCup for awhile but returned to Notepad++. I do like the way I can upload from within Coffeecup - saved having to open Filezilla but it seemed to screw a few things up in background like changing single apostrophes to a form that required

    & # 1 8 0 ;

    to validate. I prefer to type ...don't... to

    don& # 1 8 0 ;t

     

    Gee I can't even type the code for the single apostrophe without it converting it! (Just remove the spaces to see what I mean!)

    Cheers

  9. Thanks for the reply. The html code that CoffeeCup makes available all have the closing tags, ie, <p> </p>, and etc used in html. I hope I can afford Dreamweaver sometime soon, as it seems they have things figured out a bit better than some others. Unfortunately I already completed a free trial from Adobe, before finding this site! Thanks again for the help.

  10. Moving over to HTML 4.01 Strict will not break the site but it won't validate either. XHTML uses a self closing tags <img src="url" />. Also there are cases where no closing tags are required such a <p>, <li>, etc.

     

    Now I am not familiar with Coffee Cup but when using MS Expression Web, it determines which DocType is being used and so therefore it applies the correct formatting.

     

    Also, if I so happened to code a site in XHTML but later I want to covert it over to HTML all I have to do is change the DocType and then apply Reformat HTML. It will then apply the correct formatting thus removing the XHMTL formatting.

     

    So you might check to see if Coffee Cup has such a feature.

     

    Keep in mind that some programs require XHTML to parse information but it's rare. My suggestion is to make a backup copy of the original file first before making the transition.

  11. I am using CoffeCup to edit html and when I create a new document, it defaults to the XHTML DOC TYPE, Transitional.

     

    What I am wondering is if I overwrite the doc type with the HTML 4.01 Strict information, which you suggest we use, is the rest of the information on the webpage then read correctly by browsers if I do that?

     

    I guess what I am asking is this: other than the DOC TYPE at the beginning, is the HTML and CSS that are used to construct the page exactly the same regardless of the DOC TYPE, or would simply over-writing the doc type cause problems with browsers interpreting the rest of the page?

     

    I hope this post makes sense.

×
×
  • Create New...