You are here: WordPress question.... « PHP Programming Language « IT news, forums, messages
WordPress question....

Posted by maya on 10/23/07 15:16

hi expert php'ers.....;)

is it ok to ask WordPress questions here? I mean if you don't get a
response to your quetion in WP forums where else can you go??
I have WP 2.3 installed on my own hosting server..
I'm tying to do something that should be quite simple yet I can't get it
to work...

I want to do my own form, w/o having to use a plugin.. I tried a contact
plugin, but you can't specify what address to send email to, which
renders the plugin pretty useless.. in readme file for the plugin is
url to a forum for plugin (www.linksback.org/forums) in this forum I
found question on how to change 'to' email address, this is the answer:
"It is set to go to the default wordpress email. [oh really? what
address exactly???] I will include an option to change that in the next
version" (a joke, if you ask me..) I found a variable for "to" email
address among the code, and changed it there, but it still didn't work..

I have my own php-code for sending email, that works fine if the form
submitting is OUTSIDE WP-installation; but if the form is INSIDE the
installation, no info gets passed to my ThankYou.php page, which I have
put outside WP-installation and in 'action' attr inside form tag put an
absolute link to it..

this is my email code, which, again, works fine if form is outside
WP-installation:

$sendername = $_POST['name'];
// echo "name of sender: $sendername<br>";
$email = $_POST['email'];
// echo "email of sender: $email<br>";
$headers = "From: $sendername <$email>" . "\r\n";
$msg = $_POST['msg'];
$msg = wordwrap($msg, 70);
// echo "msg: $msg";
$subj = "feedback from blog";
$to = "<my address>";
mail($to,$subj,$msg,$headers);

I have used this code on numerous occasions, with two different
php-hostings.. does anybody know WHY it doesn't it work with Word Press
(i.e., if form/info comes from inside WP-installation)?? folks in
WP-formus keep pointing me to this and that other plug-in, but I'd
rather use my own code than having to go to an interface to configure
someone else's code... I mean look at all the stuff you have to do for
this one, for example, http://green-beast.com/blog/?page_id=136.. it's
just crazy.. why won't 'normal' php code ;) work with a form that's
inside WP-installation?? I mean if I can't use my own code for stuff
for something simple like this then what is the point of open-source???? ;)

I hope it's ok to ask this here, this is getting a bit frustrating at
this point (reason I want to use form rather than use 'mailto' link is
that I don't want my email address on the site, as one way spammers
gather email addresses is they harvest them to 'mailto' links, AND: and
I really need to specify 'to' address, since this is an address that is
not even in blog-domain (i.e., email address is something like
"me@mydomain.com, mydomain not being domain for the blog (I don't want
to have to check more addresses than necessary, and this is just a
personal blog, I will probably get very little email..)

thank you very much..

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация