Jump to content

Unrecognized

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by Unrecognized

  1. Nevermind everyone, a college already came up with an search term. The tool I used to "beautify" my CSS file can be found here: http://www.cleancss.com/css-beautify/ Works like a charm, I hope this helps out other people too.
  2. Unrecognized

    CSS structure

    Hello everyone, A while back, I used a online tool which helped me to structure my CSS. What I mean is, I had 1 huge line of CSS code and wanted to be below eachother. 1 line example: body,html{width:100%;height:100%;margin:0;padding:0}.page-preloader{top:0;left:0;z-index:999;position:fixed;height:100%;width:100%;text-align:center} Below eachother example: body,html{ width:100%; height:100%; margin:0; padding:0 } .page-preloader{ top:0; left:0; z-index:999; position:fixed; height:100%; width:100%; text-align:center } This is what I want, but the code is way too long to do it all with backspaces and returns. So my question is, does anyone know a tool for this because I forgot which tool I used and how it was called. Thanks for helping me out! Kind regards, Dion.
  3. Hello Beckyking, The form I created wasn't sending any emails, so I had the same problem. In my case there was something wrong with a JavaScript thingy, it started sending emails when I removed the JavaScript part. Do you use any JavaScript with your contact form? Kind regards, Dion.
  4. Indeed, I'm looking for a way to stop that. Not sure how I'm going to do that yet as I'm not very good in JavaScript.
  5. I somehow fixed it by removed this little JavaScript code: //Ajax contact var form = $('.contact-form'); form.submit(function () { $this = $(this); $.post($(this).attr('action'), function(data) { $this.prev().text(data.message).fadeIn().delay(3000).fadeOut(); },'json'); return false; }); I added a email input into my form and uploaded it to my webhost. Tried the form out and it worked perfect, it actually sends the details to my email address right now. Thank you all for the patience, kindness and help!
  6. I tried learning JavaScript, but I didn't had the same amount of interest in JavaScript as in HTML and CSS. That's the sad part, maybe this is a good thing so I'll go and learn JavaScript.
  7. I'm using a template which had the JSON thing already in this file, so I didn't remove it because I didn't understand it fully. There is actually a couple JavaScript files added to my website, but only 1 were I could find something about the contact form. This is the part I found in the JavaScript which is about the contact form: //Ajax contact var form = $('.contact-form'); form.submit(function () { $this = $(this); $.post($(this).attr('action'), function(data) { $this.prev().text(data.message).fadeIn().delay(3000).fadeOut(); },'json'); return false; });
  8. Once again, I'm not sure if I'm doing it right. I tried the following: <?php header('Content-type: application/json'); $status = array( 'type' => 'success', 'message' => 'Email sent!' ); $name = trim(stripslashes($_POST['name'])); $email = trim(stripslashes($_POST['email'])); $subject = trim(stripslashes($_POST['subject'])); $message = trim(stripslashes($_POST['message'])); echo var_dump($_POST); $email_from = 'info@dioncreations.com'; $email_to = 'info@dioncreations.com'; $body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message; $success = @mail($email_to, $subject, $body, 'From: <'.$email_from.'>'); echo json_encode($status); die; ?> I tried it without the echo and the form didn't work anymore so I added the echo again. When I went to the index.html and tried sending the form it didn't gave me a "Email sent!" message anymore but I had an email still without any content only the name, subject, email and message. So I tried going to my mailer.php file instead of going to my index.html and had the same email in my inbox but the PHP file was giving me this message: array(0) {}{"type":"success","message":"Email sent!"}
  9. I hope I understood you right and I tried the following: $name = trim(stripslashes($_POST['name'])); $email = trim(stripslashes($_POST['email'])); $subject = trim(stripslashes($_POST['subject'])); $message = trim(stripslashes($_POST['message'])); echo var_dump($name, $email, $subject, $message);
  10. Hello Krishnanayaks, The only method I'm always using whenever needed is the following line between my <head></head> tags: <meta http-equiv="refresh" content="0; url=http://www.domain.com/">
  11. Trying to fix the contact form I'm working on.

  12. I do receive the emails now but they are empty and I've no clue how to fix it. The only thing I'll get is: Name: Email: Subject: Message: And the subject is also empty.
  13. Hello everyone, I'm having some trouble with fixing my contact form, it doesn't send any details to my email address. The form I made is coded in HTML and I use PHP to send the details away. I contacted the hosting company of my website and they said the following: "Mail with another sender than the domain from which it got sended is unfortunately not possible anymore, the mail which will be send from dioncreations.com has to be a @dioncreations.com address. We did this because spammers abused the contact forms multiple times which gave our mail servers some difficulties." So I'm trying to fix my PHP send script so it will send the details to my email address. PHP script: <?php header('Content-type: application/json'); $status = array( 'type' => 'success', 'message' => 'Email sent!' ); $name = @trim(stripslashes($_POST['name'])); $email = @trim(stripslashes($_POST['email'])); $subject = @trim(stripslashes($_POST['subject'])); $message = @trim(stripslashes($_POST['message'])); $email_from = 'info@dioncreations.com'; $email_to = 'info@dioncreations.com'; $body = 'Name: ' . $name . "\n\n" . 'Email: ' . $email . "\n\n" . 'Subject: ' . $subject . "\n\n" . 'Message: ' . $message; $success = @mail($email_to, $subject, $body, 'From: <'.$email_from.'>'); echo json_encode($status); die; ?> HTML script <form id="main-contact-form" class="contact-form" name="contact-form" method="post" action="mailer.php" role="form"> <div class="row"> <div class="col-sm-6"> <div class="form-group"> <input type="text" class="form-control" id="name" name="name" placeholder="Name" required="required"> </div> </div> <div class="col-sm-6"> <div class="form-group"> <input type="text" class="form-control" id="subject" name="subject" placeholder="Subject" required="required"> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <textarea class="form-control" rows="8" id="message" name="message" placeholder="Message" required="required"></textarea> </div> <div class="form-group"> <button type="submit" class="btn btn-danger btn-lg">Send Message</button> </div> </div> </div> </form> Someone told me there are variables missing, but what kind of variables he wouldn't say. Can someone help me out, so I can continue with my website? I thank you kindly! Your help is much appreciated.
×
×
  • Create New...