PHP Feedback form

Associate
Joined
28 Jul 2008
Posts
468
Hi All,

Just wondering if you could give be a bit of assistance?

We have a website which was made for us by a third party with a contact form which is written in PHP. The boss has asked me to add an option to a list box which is on the form, I have done this no problem. My problem is that we have no idea where the form is sending emails to nor can I find it.

I have noticed on the code there is a part which says where to send it, so I put in my Email address but no email arrives.

Any ideas?

Thanks in advance :)
 
Thanks for getting back to me.

There is no mention of action=anything on the page

Form method=post if that helps
 
Last edited:
Thanks for getting back to me.

There is no mention of action=anything on the page

Form method=post if that helps

Then it's not standards compliant! That being said, you should see the code at the top of the page surrounded by

Code:
<?php


?>

If you want more specific help, make a copy of the code, strip out anything important (usernames, passwords if they are not being referenced in external files, private details etc) and post the contents of the <?php ?> here!
 
Last edited:
Here is the part of the code that is for the form. Since posting it looks like I was working on an old version of the page.

It now looks like it's just plain HTML.

FYI here is the form part of the code

<form method="post"><input name="op" value="send" type="hidden">
<table>
<tbody><tr>
<td><p align="left">Name:</p></td>
<td>
<div align="left">
<input name="name" size="30" maxlength="150" type="text">
</div></td>
</tr>
<tr>
<td><p align="left">E-mail:</p></td>
<td>
<div align="left">
<input name="email" size="30" maxlength="150" type="text">
</div></td>
</tr>
<tr>
<td><div align="left">Phone Number (optional): </div></td>
<td><div align="left">
<input name="phone" id="phone" type="text">
</div></td>
</tr>
<tr>
<td><div align="left">The nature of your enquiry: </div></td>
<td><div align="left">
<select name="enquiry" id="enquiry">
<option value="Web Services Enquiry">Web Services Enquiry</option>
<option value="ADSL Enquiry">ADSL Enquiry</option>
<option value="Fixed Line Enquiry">Fixed Line Enquiry</option>
<option value="Trackaphone Enquiry">Trackaphone Enquiry</option>
<option value="eFax Enquiry">eFax Enquiry</option>
<option value="General Enquiry">General Enquiry</option>
</select>
</div></td>
</tr>

<tr>
<td valign="top"><p align="left">Message:</p></td>
<td><div align="left">
<textarea name="msg" cols="40" rows="6" id="msg"></textarea>
</div></td>
</tr>
<tr><td><div align="left"></div></td> <td><div align="left">
<input name="submit" value="Submit your enquiry" type="submit">
</div></td></tr>
</tbody></table>
 
Last edited:
And that form works? I don't think it should :p

Hmm yeah!

Is that a copy of the source from opening from the web feed or from the local copy on the web server itself? What is the suffix of the file you are viewing e.g. index.php or index.htm(l)? If you are viewing the code from the web feed, the web server will have removed all of the php coding!
 
Well the copy I have on my machine (which is a back up direct from the server) isn't the same on the website...

Oh, I dunno! My head is in 50 billion places today. I will get back to you.

Come to think of it, we dont actually know if it does work as we dont know which account to check!
 
Well the copy I have on my machine (which is a back up direct from the server) isn't the same on the website...

Oh, I dunno! My head is in 50 billion places today. I will get back to you.

Come to think of it, we dont actually know if it does work as we dont know which account to check!

No probs. If you want an answer sharpish and no-one else has responded, feel free to drop me a mail to my trust and I'll do my best to help!
 
Is the php code is using an html template?

The opening <form> tag should contain an action, I was always under the impression that without one the script will not function.

The action attribute should contain the php script name that processes the form data and then either inserts it in to a database or sends it to an email address
 
Is the php code is using an html template?

The opening <form> tag should contain an action, I was always under the impression that without one the script will not function.

The action attribute should contain the php script name that processes the form data and then either inserts it in to a database or sends it to an email address

Depending on the php version the script might work without an action if the head contains some scripting to deal with it ($_POST['this']) etc. That way it will post on itself rather than passing the post details to an external php script. It will fail any validators though :p
 
Back
Top Bottom