Jump to content

Deoctor

Members
  • Posts

    663
  • Joined

  • Last visited

Everything posted by Deoctor

  1. change this $email = $_POST['email']; $name = $_POST['name']; $comments = $_POST['comments']; to like this $email = $_POST['textarea']; $name = $_POST['textfield']; $comments = $_POST['textfield2']; or else change the name fields in the form of contact.html page.
  2. just now i have checked ur url these are the parameters that are being posted when i submit the form Submit Submit textarea 324sdasdasd textfield rqeqwe textfield2 3121321 there is no fileds of name which u have given $email = $_POST['email']; $name = $_POST['name']; $comments = $_POST['comments']; change these in the form which u are submitting..
  3. i have tried out the same and could not identify the problem though i add all the required headers.. check this code might be it is working in the server which u are using. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  4. u can use the sessions/ cookies to store the values and then post them back to the form if they exists.
  5. 000webhost supports mail functionality but this mail u ll receive a little late as it needs to be posted through port 25 check your mail after some time u'll definitely receive the mail. one more thing at the place of too have u given the mail id or name..
  6. check this in your server <?php $to = ""; $subject = "Test mail"; $message = "Hello! This is a simple email message."; $from = "[email]dr.virus.india@gmail.com[/email]"; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Mail Sent to " .$to." <b>from Email Id</b> ".$from ; ?> and tell me weather u can send mails or not
  7. yes this makes sense.. check from the database by a column that whether the user is an admin or not..
  8. try like this echo " <tr><td width=\"160\" height=\"15\" align=\"left\" style=\"background-color:#cfcfc7;\" onMouseOver=\"this.style.backgroundColor=\'#cfcfc7\';\" onMouseOut=\"this.style.backgroundColor=\'#cfcfc7\';\"><a class=\"menu\" href=\"gemaco-bridge-sets.htm\"><b> Gemaco Bridge Sets</b></a></td></tr>\n"; echo " <tr><td width=\"160\" height=\"15\" align=\"left\" style=\"background-color:#edede4;\" onMouseOver=\"this.style.backgroundColor=\'#cfcfc7\';\" onMouseOut=\"this.style.backgroundColor=\'#edede4\';\"><a class=\"menu\" href=\"gemaco-bridge-sets.htm\"> Gemaco Bridge Sets</a></td></tr>\n"; echo " <tr><td height=\"1\" class=\"navdivider\"><img src=\"images/spacer.gif\" border=\"0\" hspace=\"0\" vspace=\"0\" width=\"160\" height=\"1\" alt=\"\"></td></tr>\n";
  9. so PFMaBiSmAdif we have a space at the end of the ?> tag php will not able to resolve that space or how it will be.. can u explain it to me more.. if u have any article can u just let me know of that..
  10. so..u want that script or do u need any help in the script?
  11. oops i got it wrong.. is that ur complete function? even the thing in the <!-- -->
  12. does it gave any error for you?? and also in the place of return mail($email,$subject,$body,$from); change it to mail($email,$subject,$body,$from); try adding this to ur script error_reporting(E_ALL); and tell me what is the error it gives..
  13. what for you are using the status field?? if it is free u make the default value for the filed to be 0.. this is what that u are supposed to do.. 1) when a new message/comment is entered. u need to enter that in the table and keep the status value as 0 or unpublished.. 2) when you approve this in the admin panel then if u like this u modify the status value to approved or 1 3) to make them visible in the front end just display those messages for which the status is approved or 1.. 4) if ur using the status for some other thing, then try creating a new field value for this and use it.. hope u have got it..
  14. for this u can do one small change in the mysql database and create one column with default value of 0 for it to all the messages table in your database.. so when ever it is zero u dont display the comment in the site and when the admin approve it the value of the zero should change to 1 and then all it will do..
  15. this could happen for different reasons.. one is that if u have any one value of the inputs be empty.. $myusername $mypassword or else the $sql does not return any values to the query which u have written.. just check like this echo $sql this will give u the query which u are running.. run the same in the mysql and see if u get the results
  16. yes u can use the cron or else if urz is a windows server then use the windows scheduler
  17. hi sangoku i dont know whether u have checked the code properly but here is where i am mentioning to content type $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  18. i am sending the mail to my gmail id using my smtp server.. when i send it using the localhost it does not sent in the html format where as if i send using my server it sends.. but i want the mail to be sent using my local host so hw do i do it..??
  19. This one i saw it before, but it is not working though..
  20. i already have the mime version install in the pear.. but it is not working when i try sending mail from my local machine but when i sent that from my server it is sending the mail correctly.
  21. Hai i have made one email program with the html content but still i get the html code in my mail can any one help me out.. <!-- send mail using an smtp--> <?php require_once "Mail.php"; $from = ""; $to = ""; $subject = "Hi!"; $body = "<h1>Hi</h1>,\n\nHow are you?"; $body .= ' <html> <head> <title>Birthday Reminders for August</title> </head> <body> <p>Here are the birthdays upcoming in August!</p> <table> <tr> <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr> <td>Joe</td><td>3rd</td><td>August</td><td>1970</td> </tr> <tr> <td>Sally</td><td>17th</td><td>August</td><td>1973</td> </tr> </table> </body> </html> '; $host = ""; $username = ""; $password = ""; /*$host = "mail.example.com"; $username = "smtp_username"; $password = "smtp_password";*/ $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject); $smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password)); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)) { echo("<p>" . $mail->getMessage() . "</p>"); } else { echo("<p>Message successfully sent!</p>"); } ?>
  22. what do u mean by the code.. try using the htmlspecialchars() while fetching the data from the form.. even they enter the code it will get fetched to u in what ever way they have entered.. check these other articles also... http://php.net/manual/en/function.htmlentities.php http://www.php.net/manual/en/function.htmlspecialchars.php http://www.php.net/manual/en/function.strip-tags.php
  23. the code which i gave will actually fetch the html code of the page and provide you with that, u can write this to a file as well to see the output code.. but i was actually displaying it out.
  24. <?php $10q="Thank You"; $10q .=""; ?>
×
×
  • 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.