Jump to content

chrisredding

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.chrisredding.com

Profile Information

  • Gender
    Not Telling

chrisredding's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. http://htmlhelp.com/tools/validator/ Is pretty strict, and it'll do your whole site too. But I agree with jcbarr, the W3C is probably the best. Try a search for HTML TIDY, you can get extensions for Firefox that use it. That always gives me errors, for all kinds of mad/pointless things. Even when W3C and WDG have passed it. So if you're some kind of validation masochist, that might float your boat.
  2. $perm_city doesn't sound very nice... Does that code not work then?
  3. nice. I use a static CAPTCHA on my form, but I'll have to look into the animated GIF idea. www.chrisredding.com/v4/gen/form/contact.php
  4. If the file has a .php extension, then the webserver will always parse it whenever it's requested. and so the code contained within will never be visible to prying eyes. If you have a .php file that 'includes' another file that has a .inc or .txt extension, then the prying eyes would be able to directly request the included file (if they know what it's called, and where it's located on your server) and see it's contents. If you do use .inc or .txt includes, it's a good idea to put them outside your siteroot folder, where direct requests aren't permitted.
  5. Yeah, if (!$haircolour) { $err.= "Please provide your email haircolour<br>"; } and then if you code the output to remain at the same page, it'll stop at every error. Have a look at http://www.chrisredding.com/v4/gen/form/contact.php and try some obvious errors. C
  6. In my opinion, if your webhost doesn't allow CGI, PHP mail() or cron, you should leave them. Certainly in the UK you can get very good hosts, that support loads of options. I'm not slagging off the rest of the world, the UK is my own area of expertise in terms of web hosts. Innit
  7. Just for reference to make a UK formatted date (and 24 hour time): date("d/m/Y H:i")
  8. Thank you effigy. Genius. What is <pre> then? Never heard of it.
  9. Hi, This seems like an obvious one, but I can't find anything useful anywhere: W3C Schools, PHP Freaks, WHT... Anyway, I've got a PHP script logging it's use to a .txt file. This file is outside of the root directory of the site for the usual security reasons. Inside my .htaccess protected and obscure test area I have a number of little utilities that I call upon from time to time. So I decided to add a viewer .php for the log files for the aforementioned script. So I did this: <?php echo readfile("somewhereonmyserver/some_sort_of_logs/thelog.txt"); ?> Which works a treat. But the .php script writing the 'thelog.txt' file inserts \r\n at the ends of lines. Can I make that into <br> for the version I view on the net? Many thanks Chris
  10. Hi, Well, there are a load of things under the hood. But what do you guys think of the site? Any feedback would be gratefully received. http://www.chrisredding.com Thanks Chris
  11. Bloody hell. That was quick. And very much appreciated! I've fixed it already... Many thanks for you help. Chris
  12. Hi, I have a script that checks and submits a contact form. It all works fine, but I have a small niggle... Each input field has some PHP to set it's default value, so that if the user submits the form and one or more of the fields is rejected for some reason, and the form refreshes, the fields retain their default values. This works fine on the 'input' fields, but doesn't work on the 'textarea'. You can take a look at the form here: http://www.chrisredding.com/v4/gen/form/contact.php The code for this problem area is below: <fieldset id="fieldset"> <label for="comments">Message : </label> <textarea name="comments" id="comments" type="text" class="textb" tabindex="40" cols="40" rows="10" value="<?php echo $_POST['variable'];?>"/> </textarea> </fieldset> So if the user fills in their name, email and a message, but gets the CAPTCHA code wrong for instance, their message disappears. Which would annoy the hell out of me! But their name and email remain as they have filled them in. Any idea why this might be? I've included the code for one of the fields that does work here: <fieldset id="fieldset"> <label for="email">Email : </label> <input name="email" id="email" type="text" class="textb" tabindex="1" value="<?php echo $_POST['variable'];?>" size="30"/> <br /> </fieldset> (I've hidden my variable names!) Many thanks, Cheers Chris
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.