if(strlen($fm_firstname)>0){ $fm_firstname=stripslashes($fm_firstname); }else{//If no name was entered. $fm_firstname=NULL; include('./index.php'); echo '<label for="fm_firstname" class="error">First name:</label>'; } The label element is echoed to the recalled index page, but, ...
Not sure I'm understanding you entirely, in what you know and do not know, but I'm giving it a try; If $_POST['somefield'] is missing a value (or have the wrong one entered) add it do a new variable. Check against that later to display any errors. Example; if (empty($_POST['foo'])) { $bad['foo'] = ...
Hi, I've come up with a solution that would solve my form error problem, see previous post "Customizing Mail Form Errors." Being new to PHP, I need assitance with implementation: I want the form submission pointing back to the index page. If there are errors, display different versions of ...
we either use template engines of some kind (intermediate and/or non-oop people, often), or rendering objects that can translate an object's properties into HTML, XML, Javascript or whatever we need it to end up as. An example of a template engine is Smarty . Does an example exsist for my situation...
it's just like adding layout around anything dynamic.. you can output the "header" stuff, then dynamic stuff, then "footer" stuff.. although the longer-in-tooth tend to move away from tightly integrated code and html output ;) Would you elaborate on the longer-in-tooth moving aw...
ah, basic form validation. d11wtq's simple form validation class may help or you can mix your own using isset() , empty() , regex , etc. Hi the validaiton code is groovy, my boogle is with the strark page the error messages are displayed to. What suggestions exist for making the page consistent wit...
what errors? I'd rather not just randomly type junk into your fields.. Appreciated, How does one correctly go about cusomizing the echo statments that are genereted when the first and last name are are not entered, and/or the zip and email are not valid example, the following messages appear on a b...
Remove the prepended space between the "^" and the "(" from $regexp so it looks like: $regexp = "^([a-zA-Z0-9._-]+)@([a-zA-Z0-9-])+(\.[a-zA-Z0-9-]+)+$"; The carrot signifies the beginning of the string; therefor any email address without exactly one space at the beginn...
Hi, My problem with my newbie understanding is implementing the script. Does it need be on the thank you page, if not how does one implement it in the current contact page? Should I use a thank you pop-up window? I have a strange learning curve, the site is served with all includes, the doctype is a...
at the following url working.ckimedia.com/contact.php I've a form with JS validation, I want to generate a custom thank you page that use the name, e-mail, and comments as a receipt. "Thank you $name @ $email you commented: $comments. A reply will arrive shortly." I don't want to change th...