Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. I don't see input element with name - submit.
  2. Could you put in this code immediately after "$input = $this->input->post('sourceFile')", and give us a result. echo '<pre>'.var_dump($input).'</pre>'; exit;
  3. You could encode a special characters in the string. For example: This & That == This%20%26%20That Of course, you can use urlencode php function (or someone others) to do this.
  4. Sorry, I wanted to say, my solution related to him code
  5. Your code is unreadable, illogically structured, deprecated, and incorrect. It's not my code. I just break down a table row by its id
  6. Or try my: <?php echo '<table>'; echo '<tr>'; while(list($item_id,$item_code,$item_price,$item_stock,$item_sale,$item_reg,) = mysql_fetch_row($result)) { echo "<td align=\"center\">"; echo "<img src=".$png." id=\"resizeMe\" />"; echo "<br><span class=\"admin_list\"><u>". $item_code ."</span></u>"; echo "<br>P <b>". (int)$item_price ."</b>"; echo "<br>Stocks: <b>". $item_stock ."</b>"; echo "<br>Sale? "; if($item_sale == 0){ echo "<b>NO</b>"; }else{ echo "<b>YES</b>"; } echo "<br><span class=\"admin_list_date\">Date Added: <b>". $time_reg ."</span></b>"; echo "<br><a href=\"edit_item.php?id=". urlencode($item_id) ."\">[edit]</a> "; echo "<a href=\"delete_item.php?id=". urlencode($item_id) . "\"onclick=\"return confirm('Are you sure you delete item ". $item_id ." ?');\"> [delete]</a> "; echo "<a target=\"_blank\" href=\"edit_item.php?id=". urlencode($item_id) ."\">[view]</a>"; echo "</td>"; if($item_id%5 == 0) {echo '</tr><tr>';} } echo '</tr>'; echo '</table>'; ?>
  7. You need to learn a little of RegEx and how it works in the string...
  8. Two missing in the end
  9. Nop, still nothing to my bg mail server. I don't know why PS Send me PM, if you want to make more tests.
  10. What code you have inside "config2.php" ? If you remove line 36, what's happen ?
  11. No, put in this one at the first position in e_list.txt, and try again!
  12. Copy/paste entire return.php script.
  13. Yep, I've received them at gmail.com and kaneffbrookside.ca
  14. Have you included any others files to this one ?
  15. Where is line 36 ? There is no syntax error in this file. What's the name of the file ?
  16. There is something wrong in your script, I'll give you mine.. Wait for a minute.... sendMail.php <?php // read the list of emails from the file. $email_list = file("e_list.txt"); // count how many emails there are. $total_emails = count($email_list); // go through the list and trim off the newline character. for ($counter = 0; $counter < $total_emails; $counter++) { $email_list[$counter] = trim($email_list[$counter]); } // implode the list into a single variable, put commas in, apply as $to value. $allEmails = implode(",", $email_list); if (isset($_POST['Submit'])) { $local = $_SERVER['SERVER_NAME']; $subject = $_POST['subject']; $header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain; charset=UTF-8' . "\r\n" . 'Content-Transfer-Encoding: base64' . "\r\n"; 'X-Priority: 3 (Higuest)' . "\n"; $header_.='FROM: jazzman@kaneffbrookside.ca'. "\n"; $header_ .= 'BCC: ' . $allEmails . "\n"; $message = '' . "\r\n"; $message .= $_POST['message'] . "\r\n"; if (mail(null, '=?UTF-8?B?' . base64_encode($subject) . '?=', base64_encode($message), $header_ . '')) { echo "Success"; exit; } else { echo "Failed"; exit; } } ?> <!DOCTYPE html> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <a href="control_panel.php"><small>Control panel</small></a> | <a href="startCrop.php"><small>Crop new image</small></a> | <a href="logout.php"><small>Logout</small></a> <fieldset> <legend><h2>Crop new image and send a message to subscribers</h2></legend> <form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post" enctype="multipart/form-data" accept-charset="utf-8"> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr align="left" valign="top"> <th>Title:</th> <td><input type="text" name="subject" value="" /></td> </tr> <tr><td> </td></tr> <tr align="left" valign="top"> <th width="160">Message:</th> <td><textarea row="30" cols="50" name="message"></textarea></td> </tr> </table> <input type="submit" name="Submit" value="Go" /> </form> </fieldset> </body> </html> e_list.txt tuparov86@gmail.com,dimitartuparov@mail.bg,4174890679@vmobl.com,jazzman@kaneffbrookside.ca
  17. @Shadowing, did you get my message ? I've received everything to my 30 mail boxes.
  18. You need to add your email address to headers, otherwise your hosting name will be appear there: $headers .= 'From: mail@stargatesystemlords.com' . "\r\n" . I don't know what's wrong with my .bg address and yours too.
  19. Yep, I received your message at jazzman@kaneffbrookside.ca from www-data@26hp.26horses.com. The message wasn't in a junk folder.
  20. No, still nothing Send at jazzman@kaneffbrookside.ca
  21. Do you want to be something like this: http://php.net/manual/en/function.preg-replace.php $string="Wed Jul 04 08:23:55 EDT 2012, johndoe(192.168.0.190) to all: testeeeeeeeeeeeeeeeeettttttttttttttttttttt"; $patterns = array(); $patterns[0] = '/\,/'; $patterns[1] = '/(?<=all)\:/'; $replacements = array(); $replacements[1] = '~'; $replacements[0] = '~'; echo preg_replace($patterns, $replacements, $string);
  22. Attach your script file here. I want to check something..
  23. Ignore "include('connect.php')" and try this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test</title> </head> <body> <?php $connect = mysql_connect('server','username','password'); mysql_select_db('database_name',$connect); $query = "SELECT * FROM Users WHERE Type='AD'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $ADI = $row['UID']; echo '<a href="../adverts/' . $ADI . '/' . $ADI .'.php"><img src="../adverts/' . $ADI . '/' . $ADI . '.png" /></a>'; ?> </body> </html>
  24. You probably use any php framework or CMS, right ? If you do, you have to include a default.ctp page (or something else ) rendering a proper html structure and encoding. Copy/paste this: <?php include ("connect.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test</title> </head> <body> <?php $query = "SELECT * FROM Users WHERE Type='AD'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $ADI = $row['UID']; echo '<a href="../adverts/' . $ADI . '/' . $ADI .'.php"><img src="../adverts/' . $ADI . '/' . $ADI . '.png" /></a>'; ?> </body> </html>
×
×
  • 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.