Jump to content

Help for working a contact_form


qskti

Recommended Posts

A contact_form in old server was sending e-mail ( http://gjykataelbasan.qskti.com/Na-kontaktoni.php ), in new server does not work ( http://gjykataelbasan.gov.al/Na-kontaktoni.php)
 
Can you tell me what can I do? The code is this:

            <?php 
$action=$_REQUEST['action']; 
if ($action=="")    /* display the contact form */ 
    { 
    ?> 
    <form  action="" method="POST" enctype="multipart/form-data"> 
     <div class="field"> <p>
        <input type="hidden" name="action" value="submit"> 
        <Label> <b> Emri Juaj:</b></Label>
        <br> 
        <input name="name" type="text" value="" size="30"/>
      </p> 
      </div>
     <div class="field">
      <p><br> 
        <Label> <b> Email Juaj:</b></Label>
        <br>
        <input name="email" type="email" value="" size="30"/>
      </p></div>
     <div class="field">
      <p><br> 
             <Label> <b> Mesazhi Juaj:</b></Label>
        <br>
        <textarea name="message" rows="7" cols="30"></textarea>
        <br> </p> </div> 
        <div class="field"> <p>
        <input type="submit" class="ui-widget-header" value="Dergo Mesazhin"/>
      </p> </div> 
    </form> 
    <?php 
    }  
else                /* send the submitted data */ 
    { 
    $name=$_REQUEST['name']; 
    $email=$_REQUEST['email']; 
    $message=$_REQUEST['message']; 
    if (($name=="")||($email=="")||($message=="")) 
        { 
        echo '<span style="color:#CCFFFF;font-size:28px;text-align:center;">Fushat duhen plotesuar detyrimisht qe te mundesh dergimin e mesazhit!<a href="Na-kontaktoni.php"> Provo perseri</a>."</span>'; 
        } 
    else{         
        $from="From: $name<$email>\r\nReturn-path: $email"; 
        $subject="Message sent using your contact form"; 
        mail("[email protected]", $subject, $message, $from);
		echo '<span style="color:#CCFFFF;font-size:28px;text-align:center;">Mesazhi u dergua!</span>';
       
	      } 
    }   
?>

If you give me an answer, I'll be very grateful

 

Ardian

Link to comment
https://forums.phpfreaks.com/topic/283499-help-for-working-a-contact_form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.