Hi all, i wish to replace my mailto, link with a form. I have looked a many of the previous posts, rplating to mailand feedback form. I have also done some research online. and i still do not know where to place the script.Everyone just says "now upload your script ".Ihave looked Java scripts, perl, and PHP. I think i havefound a PHP script that i can use, but i need some explicit instructions. PLEASE !
Thanks in advance for all your help. And should i disable the mailto link, ASAP?
Just bung it in the same directory as the HTML file that contains the form, but make sure that it is coded such that it will bounce a visitor to an HTML page if they try to call the PHP file directly. Otherwise, they can find your e-mail address easily.
Kemistri, i have; form method= "post" action="<? php echo $_server [script_name] ?>" >
do i have to fill in the name of the script in the square bracket? Also the form contains alot of php syntax in the text area.what does that mean? if i use that form do i remove the php syntax? it seems like the script and the form are bundled together and should not be parted. example your name<br><input type="text" style="width: 330px;" name="name" value="<?php echo $_POST['name']; ?>" maxlength="50"><br><br>
You don't really want the PHP mixed in with the markup -- that can be more difficult for you to manage and leaves it easily viewable. Not having your e-mail address in the markup is crucial to keeping it hidden and it is just much better to work neatly delineated files according to type (PHP, HTML, etc.).
Kemistri, i am a bit confused,is the script called by the contact us link on a html page or, is the script called by form after it's been submitted? if it is the former then the fields in the form will be blank, wont they? or do i just remove the syntax and use the form to call the script.
I think i may have messed up, big time. I uploaded the script and form to the public_html directory. The form does not look right, as the fields still contain php syntax. have a look here click here I went ahead and filled in the form and submitted it. It came up wiyh an error; page cannot be found. is it possible that you can have a look at the script for me and put me in the right direction?
A slip of the shift key there, I expect. You had an underscore instead of a hyphen, but I found it anyway. Looking at your source, I see a real mess. Text fields do not require values and certainly not in the form of PHP code!! If a text field has any kind of value, it will be something descriptive, such as "search" or "first name". Next up, your action is wrong; this should be the title of the PHP file, as per one of my earlier posts in which I laid out an example of that line. Then finally, there is some stray PHP at the bottom.
Obviously, there is no way for me or anyone else to view the PHP file directly, so I can't comment about that.