PDA

View Full Version : Php Email problems



econstas
07-17-2006, 10:41 AM
Hello there, this is my first post!
My website is: Holleyjohnson.net but currently in transfer process. So its http://70.86.241.194/~cncmmdly/. The form in question is: http://70.86.241.194/~cncmmdly/contact.html Its a basic registration form. Ask for name and email address.

Php file: http://70.86.241.194/~cncmmdly/contact.php

I have it getting the info but for some reason its not emailing the results. Am I missing something?

both files are in the same directory... I am also noticing that the comment: Thank you for visiting our site and ..... is not posting as an output. I am looking for some help.

Thanks,
Stratis
logid: cncmmdly

Andy128
07-17-2006, 10:57 AM
Well-
Is this currently on a Voda Host server? I should not be able to see the php script- but I can. That is not supposed to be.

Andy

econstas
07-17-2006, 11:22 AM
Yeah.. the the temporary URL that I have been given by Voda:

http://70.86.241.194/~cncmmdly/

Should this be ok after the transfer onto Voda?

Stratis

Andy128
07-17-2006, 07:17 PM
Stratis,
I suggest that you open a support ticket. I suspect something is not set correctly on your account as I can see the php code by viewing the source code of the php page- and you shouldnt be able to.

Or- where exactly did you place the php code? Did you place it "inside the body tags"? Make sure that you placed the php code properly. What instructions did you follow setting up the php script?

Andy

econstas
07-18-2006, 04:57 AM
I just set a simple notepad. Started with open php and close php.. no <html> tags. I will see with the tags..if it makes a difference.

Stratis

econstas
07-18-2006, 07:22 AM
Here is the current code: <now>

<HTML>
<HEAD>
<TITLE>Succesfully processed your order</TITLE>
</HEAD>
<BODY>
<H2>Thanks for your order!</H2>
<?PHP
$email = $HTTP_POST_VARS[email];
$mailto = conjunkbox********.com;
$mailsubj = "test script for php";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form:\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
$mailbody .= "$key : $val\n";
}
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>
</BODY>
</HTML>


I am still getting no email with the php script. I do get an output..stating thanks for posting.....
Also, If I do the mailto option from the form..I do get an email from the forum, but the output needs to be cleaned up. Ideas?

Thanks,
Stratis

econstas
07-18-2006, 10:21 AM
Interesting.. I see that the script must have worked. I recieved an email from: navalde@XXXXX.com ( didn't post full email..incase user didn't want me too)

Now, how was it that it didn't work when I tried it.

Stratis

navaldesign
07-18-2006, 10:23 AM
I tested it

navaldesign
07-18-2006, 10:26 AM
To be honest i re-produced your script page, and it was that that send the mail. However, don't try anymore. temporary URL (like yours) are PHP disabled, that's why it doesn't work.

econstas
07-18-2006, 10:30 AM
Interesting. And for a sec, I thought it was fixed.. bummer.

Could this be not working properly since script is still on temp website that Voda gave me prior to transfer of my host domain? I am thinking, something like a guest account that doesn't run all the features?

temp: http://70.86.241.194/~cncmmdly/

navaldesign
07-18-2006, 10:32 AM
That's excactly what i posted above. Although it is not a question of transfer, but a question of account setting up

econstas
07-18-2006, 10:39 AM
guess both of us were posting at the same time.. Thanks for the help.

I am currently waiting for my domain name transfer from Geocities.. oh joy. Once that happens.. this php will be fun. Thanks again.

Stratis

navaldesign
07-18-2006, 10:42 AM
Your name is Στρατης ?

econstas
07-18-2006, 10:48 AM
I like the Greek. The Greeks call me Stratos ( I don't know the option for Greek Characters) short for Efstratios. English: Stratis

navaldesign
07-18-2006, 10:51 AM
Ok, but you are not Greek, are you?

econstas
07-18-2006, 11:06 AM
Yeah I am. I am 1/2 Greek (Dad) and 1/2 Puerto Rican (Mom). Lived in the US most of my life.

navaldesign
07-18-2006, 11:39 AM
Cool, we are having a clan here!

econstas
07-19-2006, 09:39 AM
Clan, nice.

econstas
07-26-2006, 05:57 AM
I am still having the same problem. My website has now been converted to Vodahost. I am able to run a php calander (download by cpanel). No problems. Calender @ (http://holleyjohnson.net/phpcal/week.php)

I see the form output, but no email? Do I need to turn an option on for php? (no change from original post)

Form: http://www.holleyjohnson.net/contact.html
phpfile: http://www.holleyjohnson.net/contact.php


Also, is there a tool I could use that checks to see if a script is working properly?

Thanks,
Stratis

navaldesign
07-26-2006, 06:17 AM
No, your account is set up with php, you shouldn't need to do anything. Unfortunately php files are not visible to the browser, so i can't see what's in it. If you want, and if it is different from the one posted above, post it here. If it is as posted, it should work. It did in the page i created for you.

There is no such tool: you simply try and see.

However, it SEEMS to work. Check your email in the script.

econstas
07-26-2006, 08:17 AM
thanks for the help again! I will have to recheck everything.

Quick one. If I put echo commands within PHP do I need to post any other commands to have the echo commands to post on website? I am thinking of seeing if the variables are being posted -> for future work ofcourse <-

navaldesign
07-26-2006, 12:43 PM
Yes, you can do that. I do it all the time for testing purposes. Click on my signature to see how you can create a preview page of your form with the info filled in, using the echo command.

econstas
08-02-2006, 06:20 AM
Thanks for the help. I have the email working now. And now have implemented similar scripts to other weblinks. Now, on to something bigger. Database??? :)

Thanks again,
Stratis

PropertyPatrol TM
08-02-2006, 06:24 AM
I just joined and I know nothing about php. However, I have gone through the tutorials and read some threads on php on this forum and I have decided to give it a try. I am still in the process of setting up my website.

econstas
08-02-2006, 06:29 AM
There has been help throughout.. So feel free to ask questions whenever you need some help.

This is a good tutorial if you have or haven't checked it out:
http://www.vodahost.com/vodatalk/forms/9349-bluevoda-forms-tutorial-part-1-a.html#post56766

Stratis

PropertyPatrol TM
08-02-2006, 06:41 AM
Thanks for the tutorial. I know it will take me all day to work through all this. When someone posted the mailto: may not work with those who do not have IE that concerned me. About 8% of my site viewers are not IE.

navaldesign
08-02-2006, 06:56 AM
Please note that the "mailto: ..." might not work, but it doesn't depend on them using IE or Firefox or other. It purely depends on their mail client settings, and THERE IS NO GUARANTEE that their settings are correct for the form functioning. So, your only 100% garantee option is to use the php script method for processing your form. Don't loose time with anything else.

econstas
08-02-2006, 08:19 AM
Also what you face with mailto is the problem with having the user input info that you don't really need and sending it to you. With creating a form you can manipulate the information that you want the way you want.