Props and a question for db (not recording related)

Posted on

Frisco's Most Underrated
Member Since: Jan 28, 2003

Hey db, first off, I wanted to thank you for putting together your FormM@iler script and letting everybody use it (open source and all that). I'm putting together a website for my new label, and I'm using the script, and it's great. Can't say enough good things about it.

My question though, is I can't figure out how I can get the error text to show up white (as it's on a black background). Any ideas?

[ Back to Top ]


Administrator
Since: Apr 03, 2002


Dec 20, 2005 08:47 pm

Oh, well, thanks Coolo, glad it's working out for you. I find it simply amazing how many thousands of people use that script...I like it when it's people I know. :-)

The best bet in your situation is to use the forwarding feature. The default text is very simplistic. There is a variable to set to, after a submission it will send it to one of two html files depending on if the form submission is successful or not. Then, that separate HTML file is MUCH easier to stylize.

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Dec 20, 2005 09:34 pm

Ok, cool.
I'm going to review and see if I can make that work.

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Dec 27, 2005 09:28 pm

ok, so, I hope this isn't too much at this forum but...

I tried to use the forwarding feature. The code is below (I just typed in the file names of the pages I want to forward to)...

// Result options
$header[0]="";
$footer[0]="";
$error_page[0]="emailerror.html";
$thanks_page[0]="emailthanks.html";

of course I have pages called emailerror.html and emailthanks.html in the same directory. I keep coming up with the following error:

Warning: Cannot modify header information - headers already sent by (output started at c:\apache\htdocs\bossmonk\formmailer.php:16) in c:\apache\htdocs\bossmonk\formmailer.php on line 561


Anything you got db, I appreciate it. If you want me to take this somewhere else, I understand too. Thanks much.

Administrator
Since: Apr 03, 2002


Dec 28, 2005 05:35 am

Thats weird, no headers have been sent yet by that point...is this on HostPC you are getting this error?

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Dec 28, 2005 03:05 pm

um, no it's not on hostPC. It's on my computer that is not connected to the internet, but has apache and PHP running on it for development purposes.

I guess I could try and move this stuff to my HostPC server and see if I still get the same error.

Administrator
Since: Apr 03, 2002


Dec 28, 2005 03:08 pm

ah, then you have some obscure header handling configuration thingy set odd, not sure what it is, I have seen it before but VERY rarely...true turning safe mode off if it's on and see if that makes any difference, though I doubt it will.

of course, if it's PHP running on Windows, well, good luck with that... :-P

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Jan 02, 2006 03:32 pm

so, um, I transferred everything over to my host pc server, and I'm still getting the same problem. The error message returned is pretty much the same but it has a different line number than before...

Warning: Cannot modify header information - headers already sent by (output started at /home/paraph00/domains/paraphan.com/public_html/bossmonk/formmailer.php:16) in /home/paraph00/domains/paraphan.com/public_html/bossmonk/formmailer.php on line 545

Any thoughts?


Administrator
Since: Apr 03, 2002


Jan 02, 2006 04:36 pm

thats weird, I don't get it, I run MANY copies of the script on HostPC servers...I'll have to dig into the script a little bit...

Member
Since: May 09, 2004


Jan 02, 2006 05:04 pm

My question is, how did the script get down to line 545? There's only 455 lines in the script.

Did you by chance accidently copy/paste something you didn't intend to when you're configuring it?

Just a thought, that's a lot of extra lines.

Administrator
Since: Apr 03, 2002


Jan 02, 2006 05:10 pm

true, mine in dev has 481...and line 16 isn't sending any post header data...

Member
Since: May 09, 2004


Jan 02, 2006 05:34 pm

ooooo

I think I found the error on line 15...looks like an oversight 'cause of the ill-logically placed style attribite. Anyway, there are some unescaped quotes that are likely the culprit.

Line 15
$thanks_page_title="Messag style="float: right; padding-bottom: 6px;"e Sent";

That's straight from the latest zip file on your scripts page.

Administrator
Since: Apr 03, 2002


Jan 02, 2006 05:50 pm

no...I just downloaded a copy and there is no such thing in line 15 of formmailer.php

And I don't recall ever using such a statement ever in formmailer, I never use styles cuz every site has their own...

Administrator
Since: Apr 03, 2002


Jan 02, 2006 05:52 pm

oh, and I just tried his form and I get an erro on line 561.

Has somebody been hacking into the script and doing their own customizing?

Member
Since: May 09, 2004


Jan 02, 2006 06:08 pm

Oops, my bad dB

I just realized I had that copied to my clipboard from something I was working on. I must've inadvertantly pasted it in there when I was looking your script over in my IDE.

Sorry 'bout that.

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Jan 03, 2006 01:05 am

the reason why there are extra lines is because there is 121 lines of HTML and Javascript and notes that I added before your PHP scripting takes place, so that when formmailer.php is called it will look like the rest of my site.

The only changes I've made to the formmailer script are what fields to check for, what email to send to, and the names of the html files to forward on successful or unsuccesful uses of the form...

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Jan 03, 2006 01:12 am

well, I'll be durned, I removed all the HTML stuff that I had added to formmailer.php, and bingo it works perfectly. I was doing more than I needed to. You really made it as easy as possible to work with, db, and I didn't expect it to be that easy. You win!

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Jan 03, 2006 01:14 am

Oh yeah, 3 cheers for db!

Administrator
Since: Apr 03, 2002


Jan 03, 2006 06:38 am

yep, THAT is the header info being sent...

I knew it couldn't be MY fault :-)

Glad ya got it workin'

Administrator
Since: Apr 03, 2002


Jan 03, 2006 07:34 am

I should probably explain a little bit in case you don't know some of this. There are certain things that need to be finished on server-side processing before any "header data" is sent. header data is anything that displays in the browser, so, anything after the doctype declaration, or, since that bossmonk site doesn't use a doctype declaration (you should, it's important for some browsers) anything after the <html> opening tag. So you putting html at the beginning kills anything after it.

if you want to put in html to customize the success/error pages, do it down the page further on either side of where the thanks/error variables are echo'd.

Anyway, thats the short version of the error.

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Jan 03, 2006 11:52 am

db, thanks again, and thanks for the info. Actually, I was looking at the script and wondering what header information was. But yeah, the bossmonk site right now is still a rough draft as you can probably tell, but I'm surprised you found it at all, considering I didn't give you any information about it except that it was on a Host PC server.

Administrator
Since: Apr 03, 2002


Jan 03, 2006 11:53 am

If you know the directory structure of HostPC's systems, it's not too tough to figure out where the site is located...and I know the HostPC servers pretty well :-)

Ya can't hide from me, punk!

Administrator
Since: Apr 03, 2002


Jan 03, 2006 12:10 pm

oh, and FYI, on your main site www.paraphan.com/ which looks really cool, by the way, on your contact page you have all those mailto: links...thats how people get spammed...spiders find those email addresses and index them...that's whats cool about formm@iler, not all form p5rocessors, but mine anyway, the recipients emails are hidden from bots. Many formmail scripts just hold them in hidden fields, which bots still spider...so if those addresses get spam, thats likely one of the reasons why.

Prince CZAR-ming
Member
Since: Apr 08, 2004


Jan 03, 2006 01:06 pm

ooo, good point, i'm gonna have to fix that.

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Jan 03, 2006 05:24 pm

yeah db, that's the whole reason why I was trying to use your formm@iler script. I didn't want to get spammed like I do from the old site. I didn't do the old paraphan site (paraphan no longer exists as an organization by the way), a graphic designer who was the girl friend of my business partner did it. That's why it looks really cool but is not very user friendly. Anyhow, I'm taking a more simplistic approach to my new site, so that it doesn't take as long to load, and is more useful for the user to get the info they need, even if it doesn't look quite as cool as the other one. Plus the other one was done in Dreamweaver, and it was a super pain in the butt to update. Mine will be much easier (especially once I finish all the content management part of it).

Administrator
Since: Apr 03, 2002


Jan 03, 2006 05:48 pm

hell, I use Dreamweaver for most every site I run (from my house anyway, onsite I use whatever the company has, it's been InterDev lately at the last couple places) It's awesome to use in my book, but everybody has different needs.

I agree with your frame of thought, ease of use before "pretty" there is usually a good happy medium in there somewhere. Hell, HRC is the most dead simple layout in the world, but people can find what they need...though I am working on a new design, but, well whatever...anyway, glad the FormM@iler works for ya.

Frisco's Most Underrated
Member
Since: Jan 28, 2003


Jan 03, 2006 06:17 pm

Man, the couple times I've tried to arrange anything in dreamweaver and then looked at the HTML, I had no comprehension of what was going on. I figured it would be better if I coded it all from hand so if I needed to change anything, I could know how to do it. It's probably more time consuming now, but I'm assuming it will save me some headaches down the road.

I do agree with you, I think there is a good middle ground between form and function. It's just usually hard to find.

Administrator
Since: Apr 03, 2002


Jan 03, 2006 08:18 pm

oh, well,t here is the difference, I only work in code mode, never design mode...can't say how design mode works from any personal experience so I'll take your word for it. I have code everything...

Related Forum Topics:



If you would like to participate in the forum discussions, feel free to register for your free membership.