Jump to content

jazzman1

Staff Alumni
  • Posts

    2,713
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by jazzman1

  1. Yep, david is right, since you have a ssh access to this account, login into your terminal and try to call sendmail directly from the shell. Try, again to send me an email with a message od current date/time. The command is: echo `date` | /usr/sbin/sendmail tuparov86@gmail.com // or echo `date` | sendmail tuparov86@gmail.com
  2. yes...that's just fine....so I don't see anything wrong and I don't have any idea why you're running into a false result. Try those two solutions if they don't work maybe someone else would help you on this. 1. <?php $email_to = 'tuparov86@gmail.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: <$email_from>\r\n"; $headers .= "Reply-To: <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; 2. <?php $email_to = 'tuparov86@gmail.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; tuparov86@gmail.com is my testing email, try to send me an email just for the test...
  3. And the name of your domain is "MYDOMAIN.com" or something else....your real domain name?
  4. I amended my script above. when you do a 'view source' in the browser, do you see the hostname? I mean the value of $email_from variable?
  5. Run the following script and let me see the output of echo command. You are doing something wrong. <?php $email_to = 'customer@email.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: Sending Name $email_from\r\n"; $headers .= "Reply-To: The Reply To Name $email_from\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function //if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; echo ($email_to.','.$email_subject.','.$email_message.','.$headers);
  6. Try the following script and give me a feedback <?php $email_to = 'customer_address@example.com'; $email_from = $_SERVER['HTTP_HOST']; $email_subject = 'Mail subject'; $email_message = 'Mail message......'; // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: Sending Name <$email_from>\r\n"; $headers .= "Reply-To: The Reply To Name <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; Note: change only the value of $email_to with some actual email address.
  7. No, i want to change all headers string and the mail function as shown below. // create email headers $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers .= "From: Sending Name <$email_from>\r\n"; $headers .= "Reply-To: The Reply To Name <$email_from>\r\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\r\n"; // call mail function if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; Make sure that $email_to is the customer mail address and $email_from is the email provided fro your hosting provvider some like - contact@myemail.com. Can you confirm that?
  8. Ops.....sorry it was a typo....the period (.) should be in front of (=) sign, like in others lines exept first one! <?php ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); if(isset($_POST['email'])) { .......... Maybe you have a lot of emails at contact@mydomain.com, check inside this mail box.
  9. Change the headers variable in your script with mine and try again. $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/plain; charset=iso-8859-1' . "\r\n"; $headers=. "From: Sending Name <$email_from>\r\n"; $headers.= "Reply-To: The Reply To Name <$email_from>\r\n"; $headers.= "X-Mailer: PHP/" . phpversion()."\r\n"; Also, rid off in front of the php mail function this suppress (@) error operator and put the following error_reporting functions at top of the mail script you call. @mail($email_to, $email_subject, $email_message, $headers); // to if(mail($email_to, $email_subject, $email_message, $headers)) echo "MAIL - OK"; else echo "MAIL FAILED"; // at top of the file ini_set('display_startup_errors',1); ini_set('display_errors',1); error_reporting(-1); EDIT: mail_to should be the customer email address (not yours) , and mail_from and mail_reply is the mail address given by your hosting provider (contact@myemail.com). According to the output that's not correct.
  10. Replace this line - @mail($email_to, $email_subject, $email_message, $headers); with - echo ($email_to.','.$email_subject.','.$email_message.','.$headers); and let me see the output.
  11. Open up a console and try next steps: mysql -h localhost -u root -p password: # if it's empty press "ENTER" mysql> use mysql; mysql> update user set password=PASSWORD("insert-the-new-root-password") where User='root'; mysql> flush privileges; mysql> quit; # restart the mysql server for every case and try to log in again
  12. Hi Andreea115, when you send a post data to the server I recommend you to use a object litteral like this: data {} Take a look at this for a minute, how you to make a very simple test in ajax: Create two new files, named - index.php and debug.php, to be located in the same directory (folder) In an index.php file copy/paste this code: <script type="text/javascript" src="// link to jquery "></script> <script type="text/javascript"> var name = 'testajax'; var email = 'jazzman@jazzman.com'; var url = 'debug.php'; data = { name: name, email: email } function processResponse(data, status) { if(status == 'success') { // alert(true) // console.log(data); } else { alert (false) } } $.post(url, data,processResponse); </script> In the debug.php, just create an array contains a post data comming from $.post() function. <?php echo '<pre>'.print_r($_POST, 1).'</pre>'; If you install firebug in firefox(recommend you) and open a console, you can see this result: <pre>Array ( [name] => testajax [email] => jazzman@jazzman.com ) </pre> That means that the data has been successfully sent to the server and returned back to the client (browser). In the processResponse function you can apply styling to the output. This is a very basic principle how ajax works - nothing special.
  13. EDIT: on the top of joint_reg_ajaxversion.php, put it this code and alert(data) echo '<pre>'.print_r($_POST, 1).'</pre>'; exit;
  14. @Andreea115, the basic structure of a post() function is: $.post(url, data, callback). Just make a simple test for me: Replace yours $.ajax() method with next code and tell me what results you get: data = { name: "testajax", email: "testajax@yahoo.com", cat: "E", country_log: 3, honypot: "http://example.com", humancheck: "true" } function processResponse(data, status) { if(status=='success') { alert(true) } else { alert(false) } $.post('cms/views/jobs/joint_reg_ajaxversion.php', data, processResponse) PS. console is a tool from firebug, have you ever heard about firebug?
  15. Could you post a result of the string: // alert(dataStrings) // console.log(dataStrings)
  16. I think your directories looks good. Make a simple test for me> Create a new file in directory- "/home4/clickfi4/public_html/demo" and named it - debug.php. On the top of your config.php file put it - echo 'test'. A config.php must locate in "/home4/clickfi4/public_html/demo/secure_folder" In a debug.php file copy/paste next code: <?php error_reporting(E_ALL); require_once 'secure_folder/config.php';
  17. Wow....... fabulous Sorry for that, it woks perfectly for me...... thanks again my friend! EDIT: I have to spend a time learning more about recursive functions in php.
  18. Ok, put it echo getcwd() . "\n"; on the top of the files - config.php and the parent one and give us results.
  19. The best way to learn more about curl is to understand bash script language and the unix/linux systems. I've naver used curl in php, but they have a great tutorial in php.net, I think.
  20. Hm...it's getting more and more complicate for me If I'm using the code below, Barand's function failed, because it needs this id to be a part of an array: displayHierarchy($arr, [b]$rec['id'][/b], $indent+1); while (list($id, $name, $parent, $number) = mysql_fetch_row($res)) { $data[$parent][$id] = array('name'=>$name, 'number'=>$number,'total'=>0); } If I try to change it like that, the old result is displaying: while (list($id, $name, $parent, $number) = mysql_fetch_row($res)) { $data[$parent][$id] = array('id'=>$id,'name'=>$name, 'number'=>$number,'total'=>0); }
  21. @PFMaBiSmAd, I don't wanna bother you, but my data comming from DB looks exactly like this: $data[null][0] = array('name'=>'Europe', 'number'=>0,'id'=>1); $data[1][0] = array('name'=>'BG', 'number'=>8,'id'=>2); $data[2][0] = array('name'=>'Sofia', 'number'=>5,'id'=>3); $data[2][0] = array('name'=>'Varna', 'number'=>2,'id'=>4); $data[3][0] = array('name'=>'Mladost', 'number'=>4,'id'=>5); $data[4][0] = array('name'=>'Chaika', 'number'=>9,'id'=>6); Is it possible to get the same result like yours ? When you have a time, please take a look at this. Thank you, jazz.
  22. Thank you PFMaBiSmAd, I will try this
  23. Sorry guys, for EU and BG the result has to be - 28. Yes Christian, I want to take values as the sum of the children's number + its own. Examples: EU - 0+8+5+2+4+9 BG -8+5+2+4+9 Sofia-5+4 (Sofia+Mladost) Varna-2+9 (Varna+Chaika) Mladost and Chaika don't have chindren.
×
×
  • 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.