Page 1 of 1 [ 12 posts ] 

ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

18 Nov 2012, 7:43 am

ok
i've tried to make a form by following the book "Head First PHP and MySQL"
but i don't able to receive them for some reason
i also went to php.net/mail
but couldn't understand a thing

will you assist?



Trencher93
Velociraptor
Velociraptor

User avatar

Joined: 23 Jun 2008
Age: 124
Gender: Male
Posts: 464

18 Nov 2012, 8:55 am

You have not provided enough information for anyone to assist you. Be specific about what you're trying to do (including PHP code), and what errors you are getting. Then we can help walk you through what's going on.



ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

18 Nov 2012, 2:50 pm

ok
but hey, how can i really test my php to see if it is email supported?
i mean the php server itself

btw
i'm on bluehost



Trencher93
Velociraptor
Velociraptor

User avatar

Joined: 23 Jun 2008
Age: 124
Gender: Male
Posts: 464

18 Nov 2012, 3:44 pm

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?



ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

18 Nov 2012, 3:53 pm

i will try to explain it all later



ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

19 Nov 2012, 7:18 am

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



ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

19 Nov 2012, 7:37 am

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



MrXxx
Veteran
Veteran

User avatar

Joined: 11 May 2010
Age: 63
Gender: Male
Posts: 5,760
Location: New England

19 Nov 2012, 11:24 am

ronpl wrote:
could not include the script. when i tried adding it here i got a message that preventing it.


Wrap your code in the BB tag "code" like this (click "Quote" to see the tags):

Code:
<?php
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...


MrXxx
Veteran
Veteran

User avatar

Joined: 11 May 2010
Age: 63
Gender: Male
Posts: 5,760
Location: New England

19 Nov 2012, 11:51 am

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


ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

19 Nov 2012, 12:13 pm

thanks
i will find a time to read all your msgs later on



JBlitzen
Deinonychus
Deinonychus

User avatar

Joined: 10 Oct 2012
Gender: Male
Posts: 364
Location: Rochester, NY

17 Dec 2012, 3:53 am

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



ronpl
Deinonychus
Deinonychus

User avatar

Joined: 1 Aug 2012
Age: 44
Gender: Male
Posts: 333

17 Dec 2012, 7:13 am

thank you all very much i will act upon this soon
i didn't had much motivation to look into completing my form