Jump to content

Hi need help with my contact us form


HNX

Recommended Posts

ok so i made a contact form and i added php with it and this is my code

<?php
// Contact subject
$subject ="$subject";
// Details
$message="$detail";

// Mail of sender
$mail_from="$customer_mail";
// From
$header="from: $name <$mail_from>";

// Enter your email address
$to ='myemail@gmail.com';

$send_contact=mail($to,$subject,$message,$header);

// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "Your message has been received. A Response will be sent to you as soon as possible. Thank You!";
}
else {
echo "ERROR";
}
?>

 

and when i preview my html page and submit some in to test it it works, this is what it says:

 

"; // Enter your email address $to ='noorihamayun@gmail.com'; $send_contact=mail($to,$subject,$message,$header); // Check, if message sent to your email // display message "We've recived your information" if($send_contact){ echo "Your message has been received. A Response will be sent to you as soon as possible. Thank You!"; } else { echo "ERROR"; } ?>

 

is someone could please help me it would be VERY appreciated

 

Thanks,

HNX

 

Link to comment
Share on other sites

well i made a website (completly html) and i am using a contact us form and i copid someone else's contact and php files (its actually some kinda hackin) and when i changed the preferences and tried if everything works ...it doesnt:s

Link to comment
Share on other sites

In that case theres your problem. PHP is a server side language. It is not a client side language like HTML/Javascript/CSS which your browser can read.

 

In order for your to run your PHP files you'll need to install a http server configured with PHP. If you are new to PHP then I suggest WAMP (http://www.wampserver.com). WAMP is a pre-configured package which will setup Apache and PHP (and MySQL which is a database) for you so you can run your PHP scripts.

 

Also I recommend you to watch the first video on this site for installing and how to use wamp

Link to comment
Share on other sites

wow dude thank you very much Lol ill come back t0 yoou once i finished everything to say thanks again and can i have ur email???

Nope. I do not give out email/IM or any other contact details over the net. Only to friends and family sorry. Once you have reached 10 or more posts you'll be able to PM. You can contact me via PM if you wish.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.