Search found 15 matches

by obi_wasabi
Thu Sep 01, 2005 8:59 pm
Forum: PHP - Code
Topic: Form Error Styling Attempt
Replies: 4
Views: 163

feyd wrote:If you want to be able to change the contents of it, yes, in some fashion.
Hi,

Thanks, I'll break the form down into a php include, and carry on from there. I'll be in touch.
by obi_wasabi
Thu Sep 01, 2005 8:21 pm
Forum: PHP - Code
Topic: Form Error Styling Attempt
Replies: 4
Views: 163

feyd wrote:I'm going to guess the index.php file creates some variables or something and the output is done afterward in the script?
Simply plain xhtml/css.
I getting the feeling the index page and form have to be generated by php?
by obi_wasabi
Thu Sep 01, 2005 6:09 pm
Forum: PHP - Code
Topic: Form Error Styling Attempt
Replies: 4
Views: 163

Form Error Styling Attempt

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, ...
by obi_wasabi
Thu Sep 01, 2005 9:23 am
Forum: PHP - Code
Topic: Form Error Styling
Replies: 2
Views: 147

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'] = ...
by obi_wasabi
Thu Sep 01, 2005 8:01 am
Forum: PHP - Code
Topic: Form Error Styling
Replies: 2
Views: 147

Form Error Styling

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 ...
by obi_wasabi
Wed Aug 31, 2005 11:33 am
Forum: PHP - Code
Topic: Customizing Mail Form Error Pages
Replies: 10
Views: 1067

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...
by obi_wasabi
Wed Aug 31, 2005 10:59 am
Forum: PHP - Code
Topic: Customizing Mail Form Error Pages
Replies: 10
Views: 1067

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...
by obi_wasabi
Wed Aug 31, 2005 10:44 am
Forum: PHP - Code
Topic: Customizing Mail Form Error Pages
Replies: 10
Views: 1067

feyd wrote:adding layout around the errors.
Hi,

Any online examples of adding layout around the errors? I searched and found nothing.
by obi_wasabi
Wed Aug 31, 2005 10:15 am
Forum: PHP - Code
Topic: Customizing Mail Form Error Pages
Replies: 10
Views: 1067

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...
by obi_wasabi
Wed Aug 31, 2005 9:36 am
Forum: PHP - Code
Topic: Customizing Mail Form Error Pages
Replies: 10
Views: 1067

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...
by obi_wasabi
Wed Aug 31, 2005 9:12 am
Forum: PHP - Code
Topic: Customizing Mail Form Error Pages
Replies: 10
Views: 1067

Customizing Mail Form Error Pages

Hi,

Would someone offer a suggestion on customizing the php error page generated by the the mailform at the following url:

http://www.ckimedia.com/php_version/index.php

I searched by have not found anything really addressing the issue.

O/W
by obi_wasabi
Tue Apr 19, 2005 9:27 am
Forum: PHP - Code
Topic: [SOLVED] Faulty Expression
Replies: 2
Views: 213

Faulty Expression

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...
by obi_wasabi
Mon Apr 18, 2005 11:54 am
Forum: PHP - Code
Topic: [SOLVED] Faulty Expression
Replies: 2
Views: 213

[SOLVED] Faulty Expression

<? $email1 = "steve@codejunkie.co.uk"; $email2 = "not a@valid email"; $regexp = "^ ([a-zA-Z0-9._-]+)@([a-zA-Z0-9-])+(\.[a-zA-Z0-9-]+)+$"; if (eregi($regexp, $email1)) { print "E-mail address '$email1' is valid <br>\n"; } else { print "E-mail address '$em...
by obi_wasabi
Thu Dec 16, 2004 1:59 pm
Forum: PHP - Code
Topic: php thank you page
Replies: 3
Views: 934

php thank you page

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...
by obi_wasabi
Thu Dec 16, 2004 12:35 pm
Forum: PHP - Code
Topic: php thank you page
Replies: 3
Views: 934

php thank you page

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...