Jump to content

mr.abuasbe

Members
  • Posts

    9
  • Joined

  • Last visited

About mr.abuasbe

  • Birthday 01/09/1992

mr.abuasbe's Achievements

Newbie

Newbie (1/7)

1

Reputation

  1. i tried now this code from the web, and the same problem .. i can't run it ... (i'm trying locally now) <?php $field_name = $_POST['cf_name']; $field_email = $_POST['cf_email']; $field_message = $_POST['cf_message']; $mail_to = 'mr.abu@gmail.com'; $subject = 'Message from a site visitor '.$field_name; $body_message = 'From: '.$field_name."\n"; $body_message .= 'E-mail: '.$field_email."\n"; $body_message .= 'Message: '.$field_message; $headers = 'From: '.$field_email."\r\n"; $headers .= 'Reply-To: '.$field_email."\r\n"; $mail_status = mail($mail_to, $subject, $body_message, $headers); if ($mail_status) { ?> <script language="javascript" type="text/javascript"> alert('Thank you for the message. We will contact you shortly.'); window.location = 'contact_page.html'; </script> <?php } else { ?> <script language="javascript" type="text/javascript"> alert('Message failed. Please, send an email to gordon@template-help.com'); window.location = 'contact_page.html'; </script> <?php } ?> <form action="contact.php" method="post"> Your name<br> <input type="text" name="cf_name"><br> Your e-mail<br> <input type="text" name="cf_email"><br> Message<br> <textarea name="cf_message"></textarea> <br> <input type="submit" value="Send"> <input type="reset" value="Clear"> </form>
  2. i know there are differents... because i changed it.. know the names are equal to the contact.php but still not working
  3. no its really not there, the same error also when i upload the website .. what should id do ?! i'm making a business site to friend and i promised him to finish it today, but this contact form make me disappointed
  4. if some one can give me ready code i will be happy.. i need to finish this thanks
  5. this my contact.php jQuery(function($) { $("#contact_form").submit(function() { var email = $("#email").val(); // get email field value var name = $("#name").val(); // get name field value var msg = $("#msg").val(); // get message field value $.ajax( { type: "POST", url: "https://mandrillapp.com/api/1.0/messages/send.json", data: { 'key': 'sVRLFidC1A7K56TuUkyUQg', 'message': { 'from_email': email, 'from_name': name, 'headers': { 'Reply-To': email }, 'subject': 'Website Contact Form Submission', 'text': msg, 'to': [ { 'email': 'mr.abuasbe@gmail.com', 'name': 'Riyadh Al Nur', 'type': 'to' }] } } }) .done(function(response) { alert('Your message has been sent. Thank you!'); // show success message $("#name").val(''); // reset field after successful submission $("#email").val(''); // reset field after successful submission $("#msg").val(''); // reset field after successful submission }) .fail(function(response) { alert('Error sending message.'); }); return false; // prevent page refresh }); }); and windows iis is disabled ! (see attached photo)
  6. hi, i'm trying to make contact form, i'm working with html and i have Linux server. now when i press submit button i'm getting HTTP Error 405.0 - Method Not Allowed <form role="form" action="assets/contact.php" method="post"> <div class="form-group"> <label class="sr-only" for="contact-email">Email</label> <input type="text" name="email" placeholder="Email..." class="contact-email form-control" id="contact-email"> </div> <div class="form-group"> <label class="sr-only" for="contact-subject">Subject</label> <input type="text" name="subject" placeholder="Subject..." class="contact-subject form-control" id="contact-subject"> </div> <div class="form-group"> <label class="sr-only" for="contact-message">Message</label> <textarea name="message" placeholder="Message..." class="contact-message form-control" id="contact-message"></textarea> </div> <div class="form-group"> <label for="contact-antispam">Antispam question: 7 + 5 = ?</label> <input type="text" name="antispam" placeholder="Your answer..." class="contact-antispam form-control" id="contact-antispam"> </div> <button type="submit" class="btn">Send message</button> </form> HTTP Error 405.0 - Method Not Allowed The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used. Most likely causes: The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request. A request was sent to the server that contained an invalid HTTP verb. The request is for static content and contains an HTTP verb other than GET or HEAD. A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD. Things you can try: Verify the list of verbs enabled for the module handler this request was sent to, and ensure that this verb should be allowed for the Web site. Check the IIS log file to see which verb is not allowed for the request. Check the failed request tracing logs for additional information about this error. For more information, click here. Detailed Error Information: Module StaticFileModule Notification ExecuteRequestHandler Handler StaticFile Error Code 0x80070001 Requested URL http://localhost:35840/assets/contact.php Physical Path C:\Users\Omar\Desktop\XPOZ\assets\contact.php Logon Method Anonymous Logon User Anonymous Request Tracing Directory C:\Users\Omar Abu Asbe\Documents\IISExpress\TraceLogFiles\XPOZ More Information: This error means that the request sent to the Web server contained an HTTP verb that is not allowed by the configured module handler for the request. View more information ยป ANY HELP ?!
  7. thanks for your help .. now response didn't work for me .. i used this way : i created div (rowdg) and wrote in the div from the server side for (int i = 0; i < rowCounter; i++) { rowdg.InnerHtml += "<div class="+'"'+ "col-sm-6 col-md-4" +'"'+ ">"; rowdg.InnerHtml += "<div class=" + '"' + "thumbnail" + '"'+ "style="+'"'+ "height:400px" + '"'+ ">"; rowdg.InnerHtml += "<img src=" + '"' + array[i, 2] + '"' + "height="+'"'+"225"+'"'+"width="+'"'+ "225" +'"' + "/>"; rowdg.InnerHtml += "<div class=" + '"' + "caption" + '"' + ">"; rowdg.InnerHtml += "<h3 class=" + '"' + "d-text" + '"' + ">" + array[i, 1] + "</h3>"; rowdg.InnerHtml += "<p class=" + '"' + "d-text" + '"' + ">" + array[i, 3] + "</p>"; rowdg.InnerHtml += "<p class=" + '"' + "=text-center" + '"' + "><a href = " + '"' + array[i; rowdg.InnerHtml += "</div>"; rowdg.InnerHtml += "</div>"; rowdg.InnerHtml += "</div>"; }
  8. Thats it, i want to make it from server side, but i didn't really know how should i make it to write to the client side. I need to replace document.write with?
  9. hi, i have this key on the client side (asp.net) function newContent() { var a = <%=rowCounter%>; for (i = 0; i < a; i++) { document.write('<div class="col-sm-6 col-md-4">'); document.write('<div class="thumbnail">'); document.write('<img src="<%= array[0,2]%>" alt="..."/>'); document.write('<div class="caption">'); document.write('<h3 class="d-text"><%= array[0,1]%></h3>'); document.write('<p class="d-text"><%= array[0,3]%></p>'); document.write('</div>'); document.write('</div>'); document.write('</div>'); } } but to make the loop work with the variables i need to move the code to server side, so how can i use document.write() on the server side ? thanks a lot
×
×
  • Create New...