![]() | | ||||||||
| | #1 | |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
| Hi all I hope you can help me. I set up a simple form on my website, only fields for name and e-mail and a send button. I am using Joomla, and I added the folowing code in the source field of an article. (Should it be here or somewhere else?) Quote:
I made sure sendmail is selected in the global configuration, and the sendmail path is given as /usr/sbin/sendmail. Now when I enter values and click send on my site I get the following message: "The page cannot be found". The URL of this page is http://www.mysite.com/sendmail.php. What is wrong? I know this is a simple form, but I want to test the sendmail function before I write a more complicated form script. Thanks | |
| | |
| | #2 |
| Advanced Warrior War Room Member Join Date: Feb 2008 Location: Escondido, CA. Becase San Marcos just wasn't hot enough.
Posts: 510
Thanks: 35
Thanked 56 Times in 55 Posts
|
Does the sendmail.php file actually exist in the root folder of your site? Any differences in capitalization between the file name & the reference to it in your code? If you manually type in the address to the file in a browser, what do you get? The sendmail.php file has to exist where your form is looking for it. In this case, since you aren't specifying the full URL (http:\\www...sendmail.php), the server is going to be looking for it in the same directory as the page your form is on. If it's in another location, either move it, or fix the location in the form: <form action="sendmail.php"...> |
| | |
| | #3 |
| Gleb War Room Member Join Date: Dec 2008 Location: Ottawa, Canada
Posts: 845
Thanks: 10
Thanked 104 Times in 85 Posts
|
$E-mail - invalid variable name. Make it $e_mail Gleb |
| | |
| | |
| | #4 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
Okay I'll give it a try. I just want to make sure (I am a day into coding...okay). I am using Joomla, and in the editor for articles there is a button to see the code, must I put both the HTML and PHP code there? In the global configuration Joomla gives the path of sendmail as I said above...should I change it somehow to the path of the article? Thanks for your time! |
| | |
| | #5 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
It still don't work. I corrected the variables in the code. In the global configuration of Joomla the path of sendmail is given as /usr/sbin/sendmail (just like that - it is the default path - I didn't change anything). What I noticed is, when I save the article and open it again, the name of the form is changed to [object] when you click on form properties in the editor. However it still remains form in the code. I changed the name of the form to [object] in the code, and it still doesn't work. When I submit a name and e-mail I get a error that the page cannot be displayed. The URL of this page is www.mysite.com/sendmail.php! Please help! I am so frustrated, I am struggeling for a week now! |
| | |
| | #6 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
Okay I think I know what is wrong. I saw that I must upload a file called sendmail.php somewhere via my ftp directory. Can someone please send me a link to such code and where I must put it?
|
| | |
| | #7 |
| Advanced Warrior War Room Member Join Date: Feb 2008 Location: Escondido, CA. Becase San Marcos just wasn't hot enough.
Posts: 510
Thanks: 35
Thanked 56 Times in 55 Posts
| |
| | |
| | #8 | |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
Sorry...I am new to all this stuff! I think I did everything right now. When I click on send I get the following message: Quote:
| |
| | |
| | #9 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
Just another thing, when I build the form in Joomla, I name the form as "form". Then when I add the text boxes an the button, the form name automatically change to [object]. I have tried to rename it back to form but it doesn't accept this change. Why is this happening?
|
| | |
| | #10 |
| Active Warrior Join Date: Jun 2009 Location: South Africa
Posts: 63
Thanks: 17
Thanked 1 Time in 1 Post
|
It works!!! Thanks everyone!! |
| | |
![]() |
|
| Tags |
| sendmail |
| Thread Tools | |
| |
![]() |