Ahhhh did I F&%^ it up? Where abouts?
Printable View
Ahhhh did I F&%^ it up? Where abouts?
Wow, my bad.
if (strlen($filecontents) > 0) $comma = ", ";
just use that.
i'm sorry.... I changed both functions; only one needed to be changed.. giving you the error.
YAY! ok works!!!!
This is probably my fault but it doesn't redirect anymore: http://www.curiousclothing.com/email_form_test.php, also is there any way to add the email to be from the actual address the person types in? At the moment it just says from apache
Can you please duplicate your page, and rename it .phps?
that will show the source (otherwise hidden as it's php).
I'll look later... gotta run...
http://www.curiousclothing.com/code_...form_test.phps done! thanks for your help :)
Ok, I understand what is going on.
the message displayed is still from when it WAS supposed to redirect.
This would make a LOT more sense if it was in a layout.
Here's the deal:
VERSION 1: with redirect:
The page includes, somewhere on it, a form.
when this form is sent with an email address,
you are sent back to the SAME page, for it to be interpreted.
when it does it's thing, it saves a message saying that it did it.
then it MAKES the page BLANK except for the simple message and a redirect.
That redirect then sends it back to your "main page", though it IS the same file.
VERSION 2: no redirect:
Same as above.
the form, then the form is sent:
it saves a message
however, this time, it displays the message ON THE PAGE,
where the form would have been.
It is working perfectly right now.
Find and change the message lines to these:
$message = "Your email was added to the mailing list.";
$message = "Your email was removed from the mailing list.";
removing from both:
"<br>Redirecting to the last page.";
That text was just left over.
When you put this in a layout, it'll do exactly what you want... it'll replace the form with the message. Remember to put the form in a div or table, so it can't expand with the message:
<div width="150">PHP and FORM GO HERE</div>
That way, it'll fit the same space.
That make sense?
Sorry... I've made a couple mistakes here... figuring it out as we go. Seems like it's working now, though.
your a legend! thanks! here you go thought you'd want to see it in all it's glory: http://www.curiousclothing.com, can you make the email come from the email address the person has entered? Or does it have to come from Apache?
Pretty cool. you should add php around that alert.
Change your body tag to this:
That way, it'll only pop up the first load, not after you submit your email.PHP Code:<body<?php if ($messages == "") { ?> onLoad="MM_popupMsg('Curious? You should be. Sydney’s rebel Ronins of streetwear are dropping their Kimono’s and picking up gear sharper than any katana from the label that killed the cats you used to love.\r\rLike an army of modern day Mifune, the Samurai of the street blend into their surroundings, snuffing the less than worthy with killer prints and cuts this season.\r\rSleek, clean killers the Curious clothing range Ronin and Geisha are decked out in tees and singlets that reflect the nature of our fine city – crucifixes in a sombre, demure black print or laughing in the pews with glitzy, ironic silver or gold foil. The hurricane-fence print reminds you of which side of the tracks you hail from… Skulls bump heads with the clouds in a range that comes from the street, but stretches to the sky. Fashion victims? Maybe….\r\rstockists?? + 61 415 397 606');"<?php }?>>
You also changed this: $filename = "emails.phplist";
...I think.
if I try to view that, it doesn't appear to exist.
I was just gonna check how it's saving them, then see how it works to remove them.
What's the new filename? (PM to me if you want to keep it hidden, though I don't think anyone will really care here)
By the way, that page is REALLY hard on the eyes. Depending on your audience, maybe, I'd definitely tone it down. Looks like it might just appeal to friends, so that's probably ok.
nice idea about only popping up once, but it still pops up, heres the code:http://www.curiousclothing.com/index_code.phps, also yea for some reason it doesn't create that file list... do I need to make the file first?