need help

hello all i have been work on this for ever
this is a copy from the html i have tried to create a php scropt to make this work
but have failed and am now looking online for help…
here is the code.

[code]Hi i have this code on my sight:

Contact form:

Message
ClearSend
[code]

it is from part of my contact form.
I have tried everything to make a php file to make this form work.
HELP PLease[/code]

From the looks you didn’t try very hard since you don’t have any php to even show us.
Here are a couple links to look at. First one is how to process a html form.
http://amecms.com/article/How-to-validate-a-form-the-right-way
Second is a already built fully functional ajax sending contact form script that I distribute.
http://amecms.com/article/Easy-to-use-contact-form-with-validation

Every time i try to use php with this it changes the layout of my contact form. i have the page layed out the way i want it and looks good but when i introduce php it changes the layout . sorry i am just getting frustrated.

this is the php i am trying to use.
[php]<?php
$mail_to = ‘my email’; // specify your email here
// Assigning data from the $_POST array to variables
$name = $_POST[‘sender_name’];
$mail_from = $_POST[‘sender_email’];

		$message = $_POST['sender_message'];  
		// Construct email subject 
	    $subject = 'www.mysite.com Message from visitor ' . $name; 
		// Construct email body     $body_message = 'From: ' . $name . "\r\n"; 
	    $body_message .= 'E-mail: ' . $mail_from . "\r\n"; 
		$body_message .= 'Phone: ' . $phone . "\r\n";  
		$body_message .= 'Message: ' . $message;   
		// Construct email headers
		$headers = 'From: ' . $mail_from . "\r\n";     
		$headers .= 'Reply-To: ' . $mail_from . "\r\n";       
		$mail_sent = mail($mail_to, $subject, $body_message, $headers);       
		if ($mail_sent == true){ ?>
                 <script language="javascript" type="text/javascript">         
				 alert('Thank you for the message. We will contact you shortly.');         
				 window.location = 'contact-form.html';         </script>     <?php } else { ?>    
                 <script language="javascript" type="text/javascript">         
				 alert('Message not sent. Please, notify the site administrator [email protected]');         
				 window.location = 'contact-form.html';     
                 </script>     
				 <?php     
				 } 
				 ?>

Read more: http://webdesy.com/how-to-create-html-php-contact-form-part-2/#ixzz37yC0cA5l[/php]

You haven’t given any of your inputs or textarea a name attribute. According to your php, you need a input that has a name=“sender_name”, name=“sender_email”, name=“sender_message”. Without those in your html, php can’t read the info you are sending it, cause it’s not seeing anything basically.

Ok that is the problem. now how to if input that into my html with out messing up the layout?

here is the link to my site the way i need it to look http://egphoto-designs.com/test/contacts.html

every time i try to introduce php the layout messes up this is what it looks like with the php but it works http://egphoto-designs.com/test2/contacts.html

could you help me out i have know idea what i am doing with php adn js i just need my site up and running

These things are the basics of html, you should know this if you’re going to be doing stuff like this.

<label><input type="text" name="sender_name" value="Full Name" onBlur="if(this.value=='') this.value='Full Name'" onFocus="if(this.value =='Full Name' ) this.value=''"></label>
                          <label><input type="text"  name="sender_email"value="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(this.value =='Email' ) this.value=''"></label>
                          <label><textarea  name="sender_message" onBlur="if(this.value==''){this.value='Message'}" onFocus="if(this.value=='Message'){this.value=''}">Message</textarea></label>

So far none of your problems have anything to do with how the page layout looks, so you’re either confused with html completely or you’re doing something severely wrong.

i am totally confused with html and i am doing something totally wrong. And to be honest i am a photographer not a web designer i am making this site for my photography business. And i still have no clue on what i am doing. the code you sent i don`t even know what to do with it. Sorry i am stupid about this i just need help getting it done.

this is the code to my contacts page. Maybe i screwed it all up.

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Contacts</title>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" media="screen" href="css/reset.css">
    <link rel="stylesheet" type="text/css" media="screen" href="css/style.css">
    <link href='http://fonts.googleapis.com/css?family=Cabin+Sketch:400,700' rel='stylesheet' type='text/css'>
    <script src="js/jquery-1.7.min.js"></script>
    <script src="js/jquery.easing.1.3.js"></script>
	<!--[if lt IE 8]>
       <div style=' clear: both; text-align:center; position: relative;'>
         <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
           <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
        </a>
      </div>
    <![endif]-->
    <!--[if lt IE 9]>
   		<script type="text/javascript" src="js/html5.js"></script>
    	<link rel="stylesheet" type="text/css" media="screen" href="css/ie.css">
	<![endif]-->
</head>
<body>
  <!--==============================header=================================-->
  <div class="header">
  	<div>
        <div class="subpages-nav">
            <nav>  
                <ul class="menu">
                    <li class="li-none"><a href="index.html">Home</a></li>
                    <li><a href="about.html">About</a></li>
                    <li><a href="portfolio.html">Portfolio</a></li>
                    <li class="li-left li-none"><a href="services.html">Services</a></li>
                    <li><a href="news.html">News</a></li>
                    <li class="current"><a href="contacts.html">Contacts</a></li>
                </ul>
                <h1><a href="index.html"><img src="images/logo.png" alt=""></a></h1>
            </nav>
        </div>
    </div>
  </div>   
<!--==============================content================================-->
    <section id="content"><div class="ic"></div>
    	<div class="pad-1">
            <div class="page6-row1">
            	<div class="col-14">
                    <h2 class="h2">Contact info:</h2>
					<dl>
                    	<dt class="clr-1"><strong >Edward Garrity</strong><br>Miyako-Machi Isesaki-Shi Gunma-Ken</dt>
                        <dd><span>Telephone:</span>080-5927-9523</dd>
                        <dd class="p3"><span>Email:</span><a href="[email protected]" class="link">[email protected]</a></dd>
                        </dl> 
                </div> 
                <div class="col-15">
                    <h2 class="h2 p2">Location:</h2>
					<div class="map img-border">
					  <iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d3214.2982175679035!2d139.1519203999994!3d36.32932161266572!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2s!4v1400935436334" width="600" height="450" frameborder="0" style="border:0"></iframe>
					</div>

                </div>
                <div class="col-16">
                    <h2 class="h2 p2">Contact form:</h2>
					<form id="form" method="post" >
                      <fieldset>
  
                          <label><input type="text" name="sender_name" value="Full Name" onBlur="if(this.value=='') this.value='Full Name'" onFocus="if(this.value =='Full Name' ) this.value=''"></label>
                           <label><input type="text"  name="sender_email"value="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(this.value =='Email' ) this.value=''"></label>
                           <label><textarea  name="sender_message" onBlur="if(this.value==''){this.value='Message'}" onFocus="if(this.value=='Message'){this.value=''}">Message</textarea></label>
 

 

                        <div class="btns"><a href="#" class="link-1">Clear</a><a href="index.html" class="link-1" onClick="">Send</a></div>
                      </fieldset>  
                    </form> 
                </div>
            </div>
        </div>           
    </section> 
<!--==============================footer=================================-->
    <footer>
        <span><strong>© 2014 EG Photo & Designs</strong><br><span>
    </footer>	           
</body>
</html>

this is the code to my php i think i messed this totally up to.

[php]

<?php $mail_to = '[email protected]'; // specify your email here // Assigning data from the $_POST array to variables $name = $_POST['sender_name']; $mail_from = $_POST['sender_email']; $message = $_POST['sender_message']; // Construct email subject $subject = 'www.mysite.com Message from visitor ' . $name; // Construct email body $body_message = 'From: ' . $name . "\r\n"; $body_message .= 'E-mail: ' . $mail_from . "\r\n"; $body_message .= 'Phone: ' . $phone . "\r\n"; $body_message .= 'Message: ' . $message; // Construct email headers $headers = 'From: ' . $mail_from . "\r\n"; $headers .= 'Reply-To: ' . $mail_from . "\r\n"; $mail_sent = mail($mail_to, $subject, $body_message, $headers); if ($mail_sent == true){ ?>
                  <script language="javascript" type="text/javascript">         
				 alert('Thank you for the message. We will contact you shortly.');         
				 window.location = 'contact-form.html';         </script>     <?php } else { ?>    
                  <script language="javascript" type="text/javascript">         
				 alert('Message not sent. Please, notify the site administrator [email protected]');         
				 window.location = 'contact-form.html';     
                  </script>     
				 <?php     
				 } 
				 ?>

[/php]

You’re missing the action="" in the form tag.

what would put in the “” ? post or mail?

action"contacts.php" ?

thanks for your help.
I still cant figure it out. I am just getting more confused
I will have to pay some one to finish it up for me if i can find some one

Ask

[member=46186]Kevin Rubio[/member] he freelances

Sponsor our Newsletter | Privacy Policy | Terms of Service