Jump to content

voip03

Members
  • Posts

    693
  • Joined

  • Last visited

Everything posted by voip03

  1. But sometimes their examples are simple and easy to understand
  2. Your code <input type="file" name=uploadedFile"/> missing double quotation mark <input type="file" name="uploadedFile"/>
  3. The rel attribute is not supported in any of the major browsers. only good for search engines. http://www.w3schools.com/TAGS/att_a_rel.asp
  4. $handle = fopen(''lovell.txt, ''a''); missing double quotation mark http://www.w3schools.com/php/func_filesystem_fopen.asp
  5. 1. This is probably a bug/misconfiguration on the exchange server or in the iPhone Exchange synchronisation 2. Check the mail set up on iPhone 3. If you have Gmail account – use safari or Google check email 4. Use Swift Mailer it will work.
  6. longer version for you. just copy , enter your email address and run it <?php if(isset($_POST['submit'])) { if (empty($_POST['name'])) {$errors[0] = 'Please enter a name'; echo 'Please enter a name'; } if (empty($_POST['subject'])) {$errors[1] = 'Please enter a subject'; echo 'Please enter a subject';} if (empty($_POST['text'])) {$errors[2] = 'Please enter your comments.'; echo 'lease enter your comments.';} if (empty($_POST['email'])) {$errors[3] = 'Please enter an e-mail'; echo 'Please enter an e-mail';} elseif (!preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i", $_POST['email'])) {$errors[4] = 'Please enter a valid e-mail address'; echo 'Please enter a valid e-mail address';} if (count($errors) == 0) { // Your OR Receiver email address $to='youremailaddress@domain.com'; // Process form $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: XXXXX\r\nReply-To: myemailaddress@gmail.com"; $subject = $_POST['subject']; $final_message = " Name - " . $_POST['name']. " email - ".$_POST['email']. " Message-".$_POST['text']; if (mail($to, $subject, $final_message, $headers) ) { echo " Thankyou! - Your feedback has been sent! "; } else { echo " Thankyou! - We could not send email. Please try later! "; } } else { var_dump($errors); } } else { ?> <form method="post" action="#"> <label for="name">* Name:</label> <input name="name" type="text" class="input_field" id="name" maxlength="40" /> <div class="cleaner_h10"></div> <label for="subject">* Subject:</label> <input name="subject" type="text" class="input_field" id="subject" maxlength="40" /> <div class="cleaner_h10"></div> <label for="email">* Email:</label> <input name="email" type="text" class="input_field" id="email" maxlength="40" /> <div class="cleaner_h10"></div> <div class="col_w340 float_r"> <label for="text">* Message:</label> <textarea id="text" name="text" rows="0" cols="0" class="required"></textarea> <div class="cleaner_h10"></div> <input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Send" /> <input type="reset" class="submit_btn float_r" name="reset" id="reset" value="Reset" /> </ div> </form> <? } ?> for your reading http://www.kirupa.com/web/php_contact_form2.htm http://www.phpeasystep.com/phptu/8.html
  7. TESTED and works fine. That error is usually as a result of a missing curly bracket , post a bit of code that causes the error.
  8. Number of points I would like to tell you. 1. Naming error – input name and if (empty($_POST['author'])) if (empty($_POST['author'])) label for="name">* Name:</label> <input name="name" type="text" class="input_field" id="name" maxlength="40" /> 2. Error in email preg_match Now try this code (please enter your email address in the $to variable) <?php if(isset($_POST['submit'])) { if (empty($_POST['name'])) {$errors[] = 'Please enter a name';} if (empty($_POST['subject'])) {$errors[] = 'Please enter a subject';} if (empty($_POST['text'])) {$errors[] = 'Please enter your comments.';} if (empty($_POST['email'])) {$errors[] = 'Please enter an e-mail';} elseif (!preg_match("/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z]{2,}$/i", $_POST['email'])) {$errors[] = 'Please enter a valid e-mail address';} if (count($errors) == 0) { // Your OR Receiver email address $to= your email address; // Process form $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: XXXXX\r\nReply-To: myemailaddress@gmail.com"; $subject = $_POST['subject']; $final_message = " Name - " . $_POST['name']. " email - ".$_POST['email']. " Message-".$_POST['text']; if (mail($to, $subject, $final_message, $headers) ) { echo " Thankyou! - Your feedback has been sent! "; } else { echo " Thankyou! - We could not send email. Please try later! "; } } else { var_dump($errors); } } else { ?> <form method="post" action="email.php"> <label for="name">* Name:</label> <input name="name" type="text" class="input_field" id="name" maxlength="40" /> <div class="cleaner_h10"></div> <label for="subject">* Subject:</label> <input name="subject" type="text" class="input_field" id="subject" maxlength="40" /> <div class="cleaner_h10"></div> <label for="email">* Email:</label> <input name="email" type="text" class="input_field" id="email" maxlength="40" /> <div class="cleaner_h10"></div> <div class="col_w340 float_r"> <label for="text">* Message:</label> <textarea id="text" name="text" rows="0" cols="0" class="required"></textarea> <div class="cleaner_h10"></div> <input type="submit" class="submit_btn float_l" name="submit" id="submit" value="Send" /> <input type="reset" class="submit_btn float_r" name="reset" id="reset" value="Reset" /> </form> <? } ?> PS :This is an example you can do any changes you like.
  9. Now when I test it, I get a blank page? means
  10. <input type="image" name="submit" src="image/submit.JPG" height="20" width="50" border="0" alt="Submit Form" /> No more question to ask, please make it solved. Thank you.
  11. You can use this example to write your code <?php foreach ($_REQUEST['chkboxarray'] as $checkbox) { echo $checkbox; echo "<br/>"; } ?> <form action="val3.php" method="post"> <input type="checkbox" name="chkboxarray[]" value=1><br/> <input type="checkbox" name="chkboxarray[]" value=2><br/> <input type="checkbox" name="chkboxarray[]" value=3><br/> <input type="submit" name="submit"> </form>
  12. just make sure receiver email address included if (count($errors) == 0) { //receiver email address $to=$_POST['email']; // Process form $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: XXXXX\r\nReply-To: myemailaddress@gmail.com"; $subject = "Your SUBJECT"; $final_message = "MESSAGE "; if (mail($to, $subject, $final_message, $headers) ) { echo " Thankyou! - Your feedback has been sent! "; } else { echo " Thankyou! - We could not send email. Please try later! "; } }
  13. Building an Online- p219 Auction Sitehttp://nadula.info/downloads/books/practical-php-and-mysql-r-building-eight-dynamic-web-applications-negus-live-linux-series.9780132239974.27359.pdf
  14. 8bit encoding is not reliable in e-mail . Non-ASCII characters into a mail body is to set Content-Transfer-Encoding to either base64 and the encode the body with base64_encode
  15. 1. Can you able to send mail? 2. extra code - using if statement. if (count($errors) == 0) { // Process form $headers = "MIME-Version: 1.0\r\n"; $headers.= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers.= "From: XXXXX\r\nReply-To: myemailaddress@gmail.com"; $subject = "Your SUBJECT"; $final_message = "MESSAGE "; if (mail($to, $subject, $final_message, $headers) ) { echo " Thankyou! - Your feedback has been sent! "; } else { echo " Thankyou! - We could not send email. Please try later! "; } }
  16. Have you correct the typing error? usename to username input name -> usename <td><input type="text" name="usename" class="input" /></td> in PHP -> $_POST['username'] $username=mysql_real_escape_string($_POST['username']);
  17. Check the DB username and password manually
  18. try this sql="SELECT id FROM user WHERE username='".$username."' and password='".$password."'"; $result=mysql_query($sql); if(!$result){ die(" Could not query the database : <br/>". mysql_error() ); } Thank you xyph.
  19. He's not a coder. He already has a pagination script set up. Again, read the thread before you reply. @OP, I don't think anyone's going to come near this topic. You posted a shitload of code but hardly any of it was relevant. You need to shorten the code to the bare essentials (queries, necessary php, etc). THANK YOU
  20. Please read the problem description. Obviously, that's been tried. After reading the article, you should have tried a few examples
×
×
  • 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.