close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Contact Form showing php licence

Thread began 1/21/2012 7:10 pm by bizzybiz99434885 | Last modified 1/26/2012 7:28 am by bizzybiz99434885 | 2364 views | 5 replies |

bizzybiz99434885

Contact Form showing php licence

Hi

I am a complete novice and I am currently building a website for my OH and I want to put a contact form on there. I have built a form and used .php but when the form is showing on the web instead of just my contact page showing it starts with the .php licence and my form doesn't work (ie: you fill in the details but it doesn't send it)

My website has been built using Dreamweaver and Cs5. Any help would be greatly appricated. Thanks

Sign in to reply to this post

Ian S

Firstly.. is PHP enabled on your server?

Secondly.. Do you have a link?

Cheers
Ian

Sign in to reply to this post

bizzybiz99434885

Have nearly got there

Hi
Thanks for replying - I have been 'messing' with it - now it appears that the licence has dissappeared from the top of the screen and it is sending the web contact form to my email address......but it is doing so without waiting to be filled in.

Basically, you click onto the 'contact page', you get a brief glimpse and then it sends a blank message to the email and the web page says that there is a http error 404.

I appricate any help - thanks

Sign in to reply to this post

Ian S

Difficult to say exactly without seeing the code.

Is the trigger of the email set to the submit button, or is it set to on page load?

Cheers
Ian

Sign in to reply to this post

bizzybiz99434885

Got the form working - but it is too quick off the mark

Hi Ian

Thank you so much for your help. Here is the code I am using to try and get the form to work. I have got rid of the licence info and the form is going to my address - however when you click on the page, it appears briefly - then an error message shows Http 404 (again) - just sending a blank form.
Thanks for you assistance
Pam

</head>

<?php

$EmailFrom = "*****@******.com";
$EmailTo = "******@*******.com";
$Subject = "Online Form";
$Name = Trim(stripslashes($_POST['Name']));
$Tel = Trim(stripslashes($_POST['Email']));
$Email = Trim(stripslashes($_POST['Comments']));

// validation
$validationOK=true;
if (!$validationOK) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}

// prepare email body text
$Body = "";
$Body .= "Name: ";
$Body .= $Name;
$Body .= "\n";
$Body .= "Email: ";
$Body .= $Email;
$Body .= "\n";
$Body .= "Message: ";
$Body .= $Comments;
$Body .= "\n";

// send email
$success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>");

// redirect to success page
if ($success){
print "<meta http-equiv=\"refresh\" content=\"0;URL=thank-you.php\">";
}
else{
print "<meta http-equiv=\"refresh\" content=\"0;URL=something-went-wrong.php\">";
}


?>


<body>

Sign in to reply to this post

bizzybiz99434885

Update

Hi Ian

My website is still a work in progress, have never built one before and I am using Dreamweaver under trial - I have 7 days left to finish it, before the trial ends - I want to buy it - but currently have other expenses, so if I dont get it finished then I wont be able to have the form on my page, which would be a shame....

This is where I am upto (I am posting this - to maybe help someone else with similar problems)

1) The Licence

I had put the following code on the page (as my host told me I should)

<?

phpinfo();

?>

This is to 'help' provide the web developer with info they might need - so it is useful to look at - but I dont think you would leave it on there, as otherwise 'everyone' can see it when they view the site.

2) Auto uploading of page

I hadn't realised there were THREE extra pages that I needed to put into the folder - if you look at the code these are:

error.htm
thank-you.php
something-went-wrong.php

Once I put these pages in the folder, I was able to view my contact page on my website.

--------- / -----------
This is what I now need help with. I fill in my contact details - and it sends the form to my email address (great) BUT there is no info on the email - so I can not see what anyone has typed - there is no name, no email and no message.

As I have said, I am under pressure to get this finished within the next week (as well as looking after triplets aged 2yrs and moving house in 4weeks - aaaarrrggg) So any help is greatly appricated, to help me speed it up. The website is almost finished - the only other thing I need to address is how to make my thumbnails in my gallery increase in size when you put your cursor over it......but that will probably be another thread !

With Thanks
Pam

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...