Hello one and all.

In simple terms Im quite an amateurs, but learning fast. I have just finished making a web email form, and have found a problem.
I need PHP, so I looked at what I made and using the help of a mate (who is quite skilled) we started to write it. For some reason it doesn't work.

Instead of the form going to the success page after submission or the fail page, it shows us the ASP page.

Could someone help please?

I have uploaded the web form along with the asp.

Thank you


<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
	<title>Organizing the Form Elements</title>
<link rel="stylesheet" type="text/css" href="../contact us/mainform.css" />
<title>New Page 1</title>

<form method="POST" ACTION="email.php">
<INPUT TYPE=HIDDEN NAME="Continue" VALUE="../Submission Page/Submission Page.htm">

<p class="legend" align="center"><font color="#FFFFFF">Account Details</font></p>
<fieldset id="personal">
Username:<input type="text" name="required-name" maxlength="12"/>
Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="email" maxlength="50"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
ID:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="ID" maxlength="12" minlength="12"/>
Wing:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="text" name="wing" maxlength="8"/>

<p class="legend" align="center"><font color="#FFFFFF">Comment Details</font></p>
<fieldset id="personal">
<textarea name="required-comment" rows="5" cols="59">Please insert your comment here...</textarea>


&nbsp;<input type="submit" value="                     " style="border: 1px solid #000000; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px; background-image: url('submit.bmp')"/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="                       " style="background-image: url('Reset.bmp')"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </form>


' Website Contact Form Generator 
' http://www.tele-pro.co.uk/scripts/contact_form/ 
' This script is free to use as long as you  
' retain the credit link  

' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim Username
Dim Email
Dim ID
Dim Wing
Dim Comment

' get posted data into variables
EmailFrom = Trim(Request.Form("EmailFrom")) 
EmailTo = "Contact_Us@Exigence.Meermajik.com"
Subject = "Contact Us Form Submission"
Username = Trim(Request.Form("Username")) 
Email = Trim(Request.Form("Email")) 
ID = Trim(Request.Form("ID")) 
Wing = Trim(Request.Form("Wing")) 
Comment = Trim(Request.Form("Comment")) 

' validation
Dim validationOK
If (Trim(EmailFrom)="") Then validationOK=false
If (Trim(Username)="") Then validationOK=false
If (Trim(Email)="") Then validationOK=false
If (Trim(ID)="") Then validationOK=false
If (Trim(Wing)="") Then validationOK=false
If (Trim(Comment)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("C:\Documents and Settings\grants\My Documents\Travian Website\Contact Us\personal_information.htm?" & EmailFrom)

' prepare email body text
Dim Body
Body = Body & "Username: " & Username & VbCrLf
Body = Body & "Email: " & Email & VbCrLf
Body = Body & "ID: " & ID & VbCrLf
Body = Body & "Wing: " & Wing & VbCrLf
Body = Body & "Comment: " & Comment & VbCrLf

' send email 
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail") 
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body

' redirect to success page 
Response.Redirect("C:\Documents and Settings\grants\My Documents\Travian Website\Submission Page\Submission Page.htm?" & EmailFrom)
10 Years
Discussion Span
Last Post by nav33n

I uploaded the asp file in notepad, sorry but the php file seems to have gone missing.


Your form posts its variables to a .php file. If its gone, it doesn't post to anything.


The PHP file was there, must have been deleted by Danni when it didnt work...

But I have tried it also using that asp file and it did the same thing


To do the same as the PHP file.
A website generated a code for me, I looked at it then started to write it for my form.

I was wondering if it was possible to have it written out, so I can see whats where and how its done


can you put the entire site (or just those three files) in a ZIP and attach it for us?

I'd love to help but I can't really from what is presented.


Thats what I have got.

To make the web form all you need is the web form itself and the PHP/ASP.

all I need is for someone to help me by either explaining how to or writting the PHP/ASP.


Its not working because if you look at the HTML for the site, it tells the form to pass its variables to email.php

You want it to send it to your new ASP file. Change it there.


Umm.. sending a mail is pretty straight forward in php. mail($to,$subject,$message,$from). You can include user defined text, form fields in $message. Instead of attaching a file, you can put your code in [ c o d e] tags. That would be much easier.
btw, to send a mail, you should configure your smtp first.


I have done that.

I told it to go to the asp file as well.
Still didn't work.

Apparently the problem is in the asp file. I need it to be rewritten...


The problem is im really new to PHP, so I can't really do it... that well.

Thats why I came on here asking for help lol.


Okay I re-wrote the php.

I test it in browser and then type in the info on the form and submit it.

Once I did that it comes up saying error 404 cannot find page.

(even though the php page is there in the address bar)

So is this a good or bad thing


Well, If it says page can't be found, then obviously it is unable to find the page. Check the path of the script.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.