what wrong with my form or php?
Sorry, I tried to help, but you are not explaining what you're doing in enough detail for anyone else to figure it out and help you. I'm not familiar with the book you mentioned (there are lots and lots of PHP books!), but you may want to look at O'Reilly's "Programming PHP" as a good tutorial and reference. (It's the only one I would spend money on.) Also, sites like php.net and stackoverflow.com can answer a lot of questions.
PHP has support for e-mail: http://php.net/manual/en/function.mail.php
I don't know what "bluehost" is. Is it a PHP module you're trying to use?
ok
so i went through the instructions in the book for creating an html form and also creating the php file for emailing and user confirmation text.
there is a chance i didn't made the files right. but another problem might be not having php support for emailing.
i also opened the page you mentioned but couldn't understand anything in it.
by creating form and php files i mean that i copied the premade form from the book and also copied the php file and uploaded them to the internet. the only change i did to the php file was to tell it my email address.
can you guess why after following it the email didn't made it's way into my inbox after sending the from from the browser?
i will include the code later
hope you can help and thank you
could not include the script. when i tried adding it here i got a message that preventing it.
you can see it here tho:
http://pastebin.com/WvEZFFe6
Wrap your code in the BB tag "code" like this (click "Quote" to see the tags):
echo "Hello World!";
?>
You have to do that to instruct the forum page not to run the code. If you don't use them, the page will attempt to run the code, some of which can be malicious. That's why the board is configured to either strip or block your ability to post it.
BTW, Bluehost does support PHP mailing.
_________________
I'm not likely to be around much longer. As before when I first signed up here years ago, I'm finding that after a long hiatus, and after only a few days back on here, I'm spending way too much time here again already. So I'm requesting my account be locked, banned or whatever. It's just time. Until then, well, I dunno...
Also, the other responders are correct. You are not providing enough of the correct information to help you with this problem.
It doesn't help to tell us what you have done, or what you think the problem is, because what you have done isn't working, and what you think the problem is, may or may not be what it is, but nobody can tell because nobody knows or understands what you are trying to accomplish.
Try answering these questions, and only these (don't cloud the readers with more information than they need).
1) Describe the form.
2) Describe the kind of information being collected by the form.
3) Describe the purpose for collecting the imformation.
4) What you want to do with the information? (i.e. just email it somewhere?)
I took a look at the page you linked to and see one problem. It appears you've placed the mailing php code into an HTML page. If memory serves (it's been a long time since I created forms like this), that won't work. You need the submit button on the HTML page to execute the php code by putting that code into a separate php file on your web site, and triggering that php code file by reference through the HTML submit button. Sorry I can't explain the details of that at the moment because it has been quite a while since I have done this.
One very important question before you go any further:
Do you have a bluehost email account set up in your bluehost account? If you haven't done that yet, nothing you do will work. You have to have a bluehost email account to specify as the "from" address before the server can send anything. That address has to be specified in your PHP code. It doesn't look like you've done that yet. There should be a $from variable set in your PHP code somewhere, and I'm not seeing that.
_________________
I'm not likely to be around much longer. As before when I first signed up here years ago, I'm finding that after a long hiatus, and after only a few days back on here, I'm spending way too much time here again already. So I'm requesting my account be locked, banned or whatever. It's just time. Until then, well, I dunno...
Looking at your pastebin, I'm inclined to agree with MrXxx that your hosting service is rejecting the attempt to send the email for some reason.
Since he says they support PHP email, I suspect he's right that it's just a question of an invalid email address or something. Maybe they only let emails through if they come from an email address hosted there. So set one up, call it "website_test" or something, and specify it as the return address.
You can contact them directly and simply ask "why doesn't my email send work?" and they'll likely help you out.
(Your code isn't broken, it's just not configured exactly right for your hosting service's email thing. And nobody knows exactly how to do that except your hosting service.)
Similar Topics | |
---|---|
something wrong |
17 Mar 2024, 8:04 pm |
Would I be wrong to do this? |
21 Feb 2024, 5:40 am |
Something Wrong With my Cat |
04 Feb 2024, 9:32 pm |
What's wrong with doing things later ? |
13 Mar 2024, 7:12 am |