Jump to content

hariskar

Members
  • Posts

    101
  • Joined

  • Last visited

Everything posted by hariskar

  1. Thanks I will check that. Input values in the form are lost when form submitted with errors and the user has to re-type all input. How could that be avoided?
  2. These were easy! Thank you again! I added some kind of uploaded_file validation, but I am not feeling very secure with it because as I see it is based on the file extension. <?php $nameErr = $emailErr = $subjectErr = $messageErr = fileErr= ""; $name = $email = $subject = $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $valid = true; if (empty($_POST["name"])) { $nameErr = "Παρακαλώ συμπληρώστε το όνομα"; $valid = false; } else { $name = test_input($_POST["name"]); } if (empty($_POST["email"])) { $emailErr = "Παρακαλώ συμπληρώστε το email"; $valid = false; } else { $email = test_input($_POST["email"]); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Μη έγκυρη μορφή email"; $valid = false; } } if (empty($_POST["subject"])) { $subjectErr = "Παρακαλώ συμπληρώστε το θέμα"; $valid = false; } else { $subject = test_input($_POST["subject"]); } if (empty($_POST["message"])) { $messageErr = "Υποχρεωτικό πεδίο"; $valid = false; } else { $message = test_input($_POST["message"]); } function getUserIP() { $client = @$_SERVER['HTTP_CLIENT_IP']; $forward = @$_SERVER['HTTP_X_FORWARDED_FOR']; $remote = $_SERVER['REMOTE_ADDR']; if(filter_var($client, FILTER_VALIDATE_IP)) { $ip = $client; } elseif(filter_var($forward, FILTER_VALIDATE_IP)) { $ip = $forward; } else { $ip = $remote; } return $ip; } $user_ip = getUserIP(); require("contact/PHPMailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->Host = "localhost"; $mail->SMTPAuth = true; $mail->SMTPSecure = "tls"; $mail->Port= 587; $mail->Username = "xxx@xxx.xx"; $mail->Password = "xxx"; $mail->CharSet = 'UTF-8'; $mail->From = $email; $mail->SetFrom("xxx@xxx.xx","Φόρμα επικοινωνίας"); $mail->AddAddress("xxx@xxx.xx", "xxx.xx"); $mail->AddReplyTo($email, $name); $mail->WordWrap = 80; $mail->IsHTML(true); $mail->Subject = $subject; $mail->Body = "Όνομα: $name<br>Email: $email <br>IP: $user_ip<br><br>Μήνυμα<br>$message"; $mail->AltBody = $message; $mail->addAttachment($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name']); if($_FILES['attachment']["type"] != "application/pdf" && if($_FILES['attachment']["type"] != "application/pdf" && $_FILES['attachment']["type"] != "application/msword") { $fileErr = "Μη έγκυρη μορφή file"; $valid = false; } if($valid){ if(!$mail->Send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; exit; } else { header('Location: thank-you');}} } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?>
  3. And finally this is the php where everything works! Thank you very much!!! <?php $nameErr = $emailErr = $subjectErr = $messageErr = ""; $name = $email = $subject = $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $valid = true; if (empty($_POST["name"])) { $nameErr = "Name is required"; $valid = false; } else { $name = test_input($_POST["name"]); } if (empty($_POST["email"])) { $emailErr = "Email is required"; $valid = false; } else { $email = test_input($_POST["email"]); } if (empty($_POST["subject"])) { $subjectErr = "Name is required"; $valid = false; } else { $subject = test_input($_POST["subject"]); } if (empty($_POST["message"])) { $messageErr = "Email is required"; $valid = false; } else { $message = test_input($_POST["message"]); } require("contact-test2/PHPMailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->Host = "localhost"; $mail->SMTPAuth = true; $mail->SMTPSecure = "tls"; $mail->Port= 587; $mail->Username = "info@xxx.gr"; $mail->Password = "xxx"; $mail->CharSet = 'UTF-8'; $mail->From = $email; $mail->SetFrom("info@xxx.xx","xxx.xx"); $mail->AddAddress("xx@xxx.xx", "xxx.xx"); $mail->AddReplyTo($_POST["email"], $_POST["name"]); $mail->WordWrap = 80; $mail->IsHTML(true); $mail->Subject = $_POST["subject"]; $mail->Body = "Όνομα: " . $_POST['name'] ."<br>Email: " . $_POST['email'] . "<br><br>Μύνημα<br>" . $_POST['message']; $mail->AltBody = $message; $mail->addAttachment($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name']); if($valid){ if(!$mail->Send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; exit; } else { header('Location: thank-you');}} } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?>
  4. This is the best that I have achieved: Now I have 1 php instead of 2, all inputs + file attachment goes to email. But 2 things are missing: if($valid){ ...... exit(); } What should I put there instead of header('Location: email.php'); (now there is no validation, all mails come, even totally empty). and the redirect to thankyou.php. If I put if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message sent!"; } "Message sent!" is above the form before I even put the inputs, if I put if(!$mail->Send()) { echo "Mailer Error: " . $mail->ErrorInfo; } else { header('Location: thankyou.php'); } I when I open form.php it is immediately redirected to thankyou.php (form.php does not show at all). So I left else, thank you and redirection out at the moment. <?php $nameErr = $emailErr = $subjectErr = $messageErr = ""; $name = $email = $subject = $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $valid = true; if (empty($_POST["name"])) { $nameErr = "Name is required"; $valid = false; } else { $name = test_input($_POST["name"]); } if (empty($_POST["email"])) { $emailErr = "Email is required"; $valid = false; } else { $email = test_input($_POST["email"]); } if (empty($_POST["subject"])) { $subjectErr = "Name is required"; $valid = false; } else { $subject = test_input($_POST["subject"]); } if (empty($_POST["message"])) { $messageErr = "Email is required"; $valid = false; } else { $message = test_input($_POST["message"]); } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } require("contact-test2/PHPMailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->Host = "localhost"; $mail->SMTPAuth = true; $mail->SMTPSecure = "tls"; $mail->Port= 587; $mail->Username = "xx@xx.xx"; $mail->Password = "xxx"; $mail->CharSet = 'UTF-8'; $mail->From = $email; $mail->SetFrom("xx@xx.gr","xx.xx"); $mail->AddAddress("xx@xx.xx", "xx.xx"); $mail->AddReplyTo($_POST["email"], $_POST["name"]); $mail->WordWrap = 80; $mail->IsHTML(true); $mail->Subject = $_POST["subject"]; $mail->Body = "Όνομα: " . $_POST['name'] ."<br>Email: " . $_POST['email'] . "<br><br>Μύνημα<br>" . $_POST['message']; $mail->AltBody = $message; $mail->addAttachment($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name']); if(!$mail->Send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; exit; } ?> <form id="contact" name="contact" autocomplete="on" style="margin-left:9px" method="post" enctype="multipart/form-data" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> Το όνομά σας<input id="name" name="name" type="text"><span class="error"><?php echo $nameErr;?></span><br> Το email σας<input id="email" name="email" type="text"><span class="error"><?php echo $emailErr;?></span><br> Θέμα<input id="subject" name="subject" type="text"><span class="error"><?php echo $subjectErr;?></span><br> Μήνυμα<br > <textarea id="message" name="message" rows="6" cols="60"></textarea><span class="error"><?php echo $messageErr;?></span><br> Βιογραφικό<input id="cv" type ="file" name='attachment'> <input id="submit" type="submit" value="Υποβολή" style="margin-top:10px"> </form>
  5. First of all thanks a lot for your help and patience! What I did till now is make the form work with 2 files and import all input to the 2nd file except the file attachment, I can not make it pass to email.php till now. I added in 1st file and <?php session_start(); ?> in the 2nd and the 2 files are: <?php $nameErr = $emailErr = $subjectErr = $messageErr = ""; $name = $email = $subject = $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $valid = true; if (empty($_POST["name"])) { $nameErr = "Name is required"; $valid = false; } else { $name = test_input($_POST["name"]); } if (empty($_POST["email"])) { $emailErr = "Email is required"; $valid = false; } else { $email = test_input($_POST["email"]); } if (empty($_POST["subject"])) { $subjectErr = "Name is required"; $valid = false; } else { $subject = test_input($_POST["subject"]); } if (empty($_POST["message"])) { $messageErr = "Email is required"; $valid = false; } else { $message = test_input($_POST["message"]); } if($valid){ header('Location: email.php'); exit(); } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?> <form id="contact" name="contact" autocomplete="on" style="margin-left:9px" method="post" enctype="multipart/form-data" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> Το όνομά σας<input id="name" name="name" type="text"><span class="error"><?php echo $nameErr;?></span><br> Το email σας<input id="email" name="email" type="text"><span class="error"><?php echo $emailErr;?></span><br> Θέμα<input id="subject" name="subject" type="text"><span class="error"><?php echo $sunjectErr;?></span><br> Μήνυμα<br > <textarea id="message" name="message" rows="6" cols="60"></textarea><span class="error"><?php echo $messageErr;?></span><br> Βιογραφικό<input id="cv" type ="file" name='attachment'> <input id="submit" type="submit" value="Υποβολή" style="margin-top:10px"> </form> and <?php require("contact-test2/PHPMailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->Host = "localhost"; $mail->SMTPAuth = true; $mail->SMTPSecure = "tls"; $mail->Port= 587; $mail->Username = "xx@xx.xx"; $mail->Password = "xxx"; $mail->CharSet = 'UTF-8'; $mail->From = $email; $mail->SetFrom("xx@xx.xx","xx.xx"); $mail->AddAddress("xx@xx.xx", "xx.xx"); $mail->AddReplyTo($_SESSION["email"], $_SESSION["name"]); $mail->WordWrap = 80; $mail->IsHTML(true); $mail->Subject = $_SESSION["subject"]; $mail->Body = "Όνομα: " . $_SESSION['name'] ."<br>Email: " . $_SESSION['email'] . "<br><br>Μύνημα<br>" . $_SESSION['message']; $mail->AltBody = $message; $mail->addAttachment($_FILES['attachment']['tmp_name'],$_FILES['attachment']['name']); if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Σας ευχαριστούμε για την επικοινωνία!"; ?> So now I will try to combine these 2 files. So I will remove sessions, keep action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?> put if($valid){ $mail->Send(); } and where/how will I put if sent header('Location: thank-you.php'); Thank you!
  6. New problem, no way form input passes to emal.php.. I tried to put in form.php <?php session_start(); if (isset($_POST['Submit'])) { $_SESSION['name'] = $_POST['name']; } ?> and in email.php $name=$_SESSION['name']; or $email = $_REQUEST['email'] ; without success..
  7. I did it! Here is what I did (it needs some content corrections): <?php $nameErr = $emailErr = $subjectErr = $messageErr = ""; $name = $email = $subject = $message = ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { $valid = true; if (empty($_POST["name"])) { $nameErr = "Name is required"; $valid = false; } else { $name = test_input($_POST["name"]); } if (empty($_POST["email"])) { $emailErr = "Email is required"; $valid = false; } else { $email = test_input($_POST["email"]); } if (empty($_POST["subject"])) { $subjectErr = "Name is required"; $valid = false; } else { $subject = test_input($_POST["subject"]); } if (empty($_POST["message"])) { $messageErr = "Email is required"; $valid = false; } else { $message = test_input($_POST["message"]); } if($valid){ header('Location: email.php'); exit(); } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?> I added $valid = false; and if($valid){ header('Location: email.php'); exit(); } Is it a problem that I have some common variables and functions in 2 forms they are in 2 different pages? $nameErr, $emailErr, $name, $email, $message and function test_input($data) ? Thank you for all help!
  8. You are right, let's get more specific: I followed the php form tutorial and made this form: <?php // define variables and set to empty values $emailErr = $radio1Err = $radio2Err = $radio3Err = $radio4Err = $radio5Err = $dateErr= ""; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST["email"])) { $email = ""; } else { $email = test_input($_POST["email"]); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $emailErr = "Λάθος μορφή email"; } } if (empty($_POST["date"])) { $dateErr = "Παρακαλώ επιλέξτε την ημερομηνία!"; } else { $date = test_input($_POST["date"]); } if (empty($_POST["radio1"])) { $radio1Err = "Παρακαλώ επιλέξτε"; } else { $radio1 = test_input($_POST["radio1"]); } if (empty($_POST["radio2"])) { $radio2Err = "Παρακαλώ επιλέξτε"; } else { $radio2 = test_input($_POST["radio2"]); } if (empty($_POST["radio3"])) { $radio3Err = "Παρακαλώ επιλέξτε"; } else { $radio3 = test_input($_POST["radio3"]); } if (empty($_POST["radio4"])) { $radio4Err = "Παρακαλώ επιλέξτε"; } else { $radio4 = test_input($_POST["radio4"]); } if (empty($_POST["radio5"])) { $radio5Err = "Παρακαλώ επιλέξτε"; } else { $radio5 = test_input($_POST["radio5"]); } } function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; } ?> <form autocomplete="on" method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> <fieldset style="border:solid 1px #c1c1c1;border-radius:5px"> <legend>Ατομικά στοιχεία (προαιρετικά):</legend> Ονοματεπώνυμο:<br> <input type="text" name="name" size="40" style="font-size:15px"><br> Επάγγελμα:<br> <input type="text" name="job" size="40" style="font-size:15px"><br> Τηλέφωνο:<br> <input type="text" name="phone" size="40" style="font-size:15px"><br> Διεύθυνση:<br> <input type="text" name="address" size="40" style="font-size:15px"><br> email:<br> <input type="text" name="email" size="40" style="font-size:15px"> <span class="error"><?php echo $emailErr;?></span> </fieldset> Σημερινή ημερομηνία:<br> <input type="date" name="date"> <span class="error">* <?php echo $dateErr;?></span> <fieldset style="border:solid 1px #c1c1c1;border-radius:5px"> <legend>Πως θα αξιολογούσατε:</legend> <h4>1. Την ποιότητα των υπηρεσιών μας</h4> <input type="radio" name="radio1" value="1"> 1 <input type="radio" name="radio1" value="2"> 2 <input type="radio" name="radio1" value="3"> 3 <input type="radio" name="radio1" value="4"> 4 <input type="radio" name="radio1" value="5"> 5 <span class="error">* <?php echo $radio1Err;?></span> <h4>2. Την ταχύτητα παράδοσης των αποτελεσμάτων</h4> <input type="radio" name="radio2" value="1"> 1 <input type="radio" name="radio2" value="2"> 2 <input type="radio" name="radio2" value="3"> 3 <input type="radio" name="radio2" value="4"> 4 <input type="radio" name="radio2" value="5"> 5 <span class="error">* <?php echo $radio2Err;?></span> <h4>3. Την ποιότητα της εξυπηρέτησης και τη συνεργασιμότητα των υπάλληλων του εργαστηρίου μας</h4> <input type="radio" name="radio3" value="1"> 1 <input type="radio" name="radio3" value="2"> 2 <input type="radio" name="radio3" value="3"> 3 <input type="radio" name="radio3" value="4"> 4 <input type="radio" name="radio3" value="5"> 5 <span class="error">* <?php echo $radio3Err;?></span> <h4>4. Τις εγκαταστάσεις και τους χώρους του εργαστηρίου μας</h4> <input type="radio" name="radio4" value="1"> 1 <input type="radio" name="radio4" value="2"> 2 <input type="radio" name="radio4" value="3"> 3 <input type="radio" name="radio4" value="4"> 4 <input type="radio" name="radio4" value="5"> 5 <span class="error">* <?php echo $radio4Err;?></span> <h4>5. Την καθαριότητα του εργαστηρίου μας</h4> <input type="radio" name="radio5" value="1"> 1 <input type="radio" name="radio5" value="2"> 2 <input type="radio" name="radio5" value="3"> 3 <input type="radio" name="radio5" value="4"> 4 <input type="radio" name="radio5" value="5"> 5 <span class="error">* <?php echo $radio5Err;?></span> </fieldset> <h4>Σχόλια που θα θέλατε να κάνετε ή προτάσεις για βελτίωση:</h4> <textarea style="resize:none;" name="message" rows="10" cols="80" style="font-size:15px;"> </textarea> <input type="submit" name="submit" value="Υποβολή" style="margin-top:20px"> </form> I want it if all required fields are filled to be sent to my email, so I want on submit to check if everything is OK and then open email.php to send it to me with PHPMailer. email.php will be something like this (I have not tried it yet because I try to figure out the "action" issue): <?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; require("contact-test2/PHPMailer/PHPMailerAutoload.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->Host = "localhost"; $mail->SMTPAuth = true; $mail->SMTPSecure = "tls"; $mail->Port= 587; $mail->Username = "xx@xx.xx"; $mail->Password = "xxx"; $mail->CharSet = 'UTF-8'; $mail->From = $email; $mail->SetFrom("xx@xx.xx","xx.xx"); $mail->AddAddress("xx@xx.xx", "xx.xx"); $mail->AddReplyTo($_POST["email"], $_POST["name"]); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = $_POST["subject"]; $mail->Body = "<html> <p>$_POST["name"]<br>$_POST["email"]<br>$_POST["date"]<br>$_POST["radio1"] ..etc..</p> </html>"; if(!$mail->Send()) { echo "Message could not be sent. <p>"; echo "Mailer Error: " . $mail->ErrorInfo; exit; } echo "Σας ευχαριστούμε για την επικοινωνία!"; ?> Thank you!
  9. Thank you for reply, but it seems difficult for me to do what you say (although I read the php tutorials)... I will continue reading..
  10. If I put action="email.php" where I have put all PHPMailer parameters I can send my form with email (smtp). But now I have action="<?php echohtmlspecialchars($_SERVER["PHP_SELF"]);?> , so how can I make my form be sent with email.php? Thank you!
  11. From a test server that uses (I believe) sendmail I can send the form to my email with <?php $msg = "$name $subject $email $comment"; $msg = wordwrap($msg,70); mail("my_email@xxxx.com","My subject",$msg); ?> But in my real server I can send only with smtp, in th email tutorial I can not see any instructions how to put in the smtp parameters in mail(). Thank you! Edit: As I see mail() does not support smtp, so I have to use PHPMailer.
  12. Thank you! Form action is action="<?php echohtmlspecialchars($_SERVER["PHP_SELF"]);?> Where should I put the mail() function if the form valid?
  13. I followed the lessons about php and php forms. Everything is clear and very useful, but I would like to ask how could I send eg this form if valid with SMTP? So, I would like to first validate the form and then send it with SMTP. Thank you!
  14. My site now with drupal and views works exactly like this: www.site.com/results for every user, but each user can see only his results. But now I want to rebuild my site without drupal. So I have to learn php .
  15. No, they have to be private. Each user should see only his results. Thank you for reply!
  16. I would like to ask if this function is possible with javascript: After a member logins in my site with name eg user1, if he clicks on menu item "Results" I want him to see only his results, so go to link www.site.com/user1. A second user with name user2 if he clicks the same menu item "Results" www.site.com/user2 should open. Is that possible with javascript? How should I start? Thank you
  17. How can a static html site have clean urls? Thank you!
  18. I corrected line finalBmi.value = finalBmi.toFixed(1); which I added but was wrong to finalBmi = finalBmi.toFixed(1); so both shown and used for calculation values are rounded the same way. So it works as I want it to.Thank you for helping!
  19. The input is in cm so 199 and not 1.99, sorry for my mistake in my previous post.But why 24.999368702810536 falls in 18.6 έως 24.9 instead of 25 έως 29.9 category? How should I make the script limits and table limits to not have such problems? With 199 and 99 the result that formula shows is 25.0 normal valuewith 99.1 and 199 the result is again 25.0 but this time Overweight
  20. I have a problem with the number rounding of a Body Mass Index formula. The formula is: For example if I use weight 99Kg and height 1.99m the result should be 24.99 Underweight = <18.5Normal weight = 18.5–24.9Overweight = 25–29.9Obesity = BMI of 30 or greater The javascript formula gives as result 25.0 but puts it in the normal category which is 18.6-24.9 instead of putting it in the next category 25-29.9.What should I change?Thank you Here is the javascript formula: <input type="button" value="Υπολογισμός" onClick="calculateBmi()"><br />ΔΜΣ: <input type="text" name="bmi" size="10"><br />Αξιολόγηση: <input type="text" name="meaning" size="25"><br /><input type="reset" value="Επαναφορά" /></form> <script language="JavaScript"><!--function calculateBmi() {var weight = document.bmiForm.weight.valuevar height = document.bmiForm.height.valueif(weight > 0 && height > 0){var finalBmi = weight/(height/100*height/100)document.bmiForm.bmi.value = finalBmi.toFixed(1)finalBmi.value = finalBmi.toFixed(1);if(finalBmi < 18.5){document.bmiForm.meaning.value = "Λιποβαρής"}if(finalBmi > 18.5 && finalBmi <25){document.bmiForm.meaning.value = "Φυσιολογικό βάρος"}if(finalBmi >= 25 && finalBmi < 30){document.bmiForm.meaning.value = "Υπέρβαρος"}if(finalBmi > 30){document.bmiForm.meaning.value = "Παχύσαρκος"}}else{alert("Παρακαλώ συμπληρώστε τα απαραίτητα πεδία!")}}//--></script>
  21. I changed it to <span style="font-family: arial,helvetica,sans-serif; font-size: small;">Μερικές χρήσιμες οδηγίες για τις εξετάσεις...</span><form method="get" action="odigies-gia-exetaseis"><div><input type="submit" value="Περισσότερα..."></div></form> and the errors are gone. Thank you!
  22. Why is this code wrong? Thank you <span style="font-family: arial,helvetica,sans-serif; font-size: small;">Μερικές χρήσιμες οδηγίες για τις εξετάσεις...</span><form method="get" action="odigies-gia-exetaseis"><input type="submit" value="Περισσότερα..."></form> I get 2 errors in http://validator.w3.org/check?uri=http%3A%2F%2Fwww.mikroviologos.gr%2Fproliptikes-exetaseis&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices
  23. The image is a sprite and the path is defined in css: .iso{background:url(http://s.mikroviologos.gr/image/hktheme/sprites2.png) 0 -67px no-repeat;height:81px;width:82px;margin-right:5px;float:left} Should it be defined in <img class="iso" /> too? I fixed the alt="" error.
  24. I get 2 errors in html validator for this image http://validator.w3.org/check?uri=http%3A%2F%2Fwww.mikroviologos.gr&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3+http%3A%2F%2Fvalidator.w3.org%2Fservices Any help?Thank you
  25. Thank you!It works now: <div><img class="iso"></h5><p>text text</p></div> .iso{background:url(http://s.mikroviologos.gr/image/hktheme/sprites2.png) 0 -67px no-repeat;height:81px;width:82px;margin-right:5px;float:left}
×
×
  • Create New...