Jump to content

gigas10

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Everything posted by gigas10

  1. im getting the built in error in the code, which says Could not send to your email. So its failing on if($sentmail)
  2. mktime would convert it to a unix timestamp
  3. nope no luck, there must be something configured incorrectly with the server or mail server. Although i cant do anything about it
  4. so what do i do? just use the smtp server for the sentfrom ?
  5. They all are, this is run on intranet, a huge company. Everyone that will be requesting a password sent to their email will be registered to the system used here and have an account set up already.
  6. so your telling me you cant email yourself? i do it all the time
  7. nope like i stated i already filled that stuff in, the sendmail path is only for unix? so that doesnt make sense that its the solution. And sendmail_from just gets over ridden by my headers
  8. Hey everyone, i've got a little problem with the mail() function. So to clarify i'm unluckily running php with IIS and mssql. I'm trying to do send mail to someone if they forgot their password, however when I send mail it always fails. Here is the part of my phpinfo() page, the smtp server is set up correctly because it mails in asp just fine. sendmail_from no value no value sendmail_path no value no value also my code <?php require_once('connectdb.php'); $tnum = $_POST['tnum']; $qry = mssql_query("SELECT passwd, email FROM members WHERE TNumber='$tnum'"); $result = mssql_num_rows($qry); if($result == 1) { $rows=mssql_fetch_array($qry); // keep password in $your_password $your_password=$rows['passwd']; // ---------------- SEND MAIL FORM ---------------- // send e-mail to ... $to=$rows['email']; // Your subject $subject="Forgotten Password"; // From $header="From: $to"; // Your message $messages= "Your password for login to our website \r\n"; $messages.="Your password is $your_password \r\n"; $messages.="more message... \r\n"; // send email $sentmail = mail($to,$subject,$messages,$header); } // else if $count not equal 1 else { echo "Could not find your email in our database<Br> "; } // if your email succesfully sent if($sentmail){ echo "Your Password Has Been Sent To Your Email Address."; echo "<a href=login-form.php>Login Page</a>"; } else { echo "Cannot send password to your e-mail address<br>"; echo $to; } ?>
  9. did u restart the apache server? did u install apache before or after php?
  10. $name = $row['Column_Name_Which_Stores_The_Users_Name']; $sex = $row['Column_Name_Which_Stores_The_Users_Sex']; $musictype = $row['Column_Name_Which_Stores_The_Users_Musictype']; echo $name; or echo "<tr><td>Name</td></tr><tr><td>" . $name . "</td></tr>";
  11. it can be done with vb, but it is impossible to do with php sryz
  12. select * from table order by asc limit 3 select * from table where id > 3 order by asc limit 2 why would you even want to do this?
  13. i bet you didnt install the mysql extensions when u installed php :-x
  14. ya im an idiot and this was worded very badly, anywho i just went with a different method, onclick and a function to switch to the page.
  15. If you have a neat little program called ventrilo, and a microphone, private message me. And i will give you my ventrilo server and run you through how to install and configure this. As well as help you write this script. Assuming i don't have a css match
  16. There's this neat little thing called www.google.com, it performs miracles, i swear it. http://www.php-mysql-tutorial.com/install-apache-php-mysql.php
  17. edit the httpd.conf file? assuming your on apache.
  18. Any form that uses a session must include session_start; at the very beginning, before any html, or any php, except for the line <?php which obviously starts your php code. What i like to do is make a file called auth.php and do a session_start; in the beginning there, and then do any checks you mgiht have. And require_once this file at the very beginning of the code.
  19. Theres a javascript function that detects onwindowclose or something, with that just have a script that detects for that, and say session.destroy
  20. Hey there, i'm a pretty intermediate user with php and mysql, but new to ajax. I'm having a problem with a forum inside of ajax, what i'm doing is when the user selects a document from a drop down menu, it displays all the info about the document, no problem. But it also brings up a drop down menu that lets them select a new owner for the document. I have a button so they can make the change, however it does not work correctly. If I put the <form> tag in my php file that the information is coming from, it just says error on page whenever someone selects a document.
  21. black crawler :-x. Change pw for every user, and redo your sites security and sql injection stripping.
  22. make another column, and take the auto increment field and the letters u need, and concat them into that column
  23. you said you needed code that would redirect a certain user to a page right? If so, then keep your if statement, and use header("location: file.php"); file.php is w/e page u want to redirect to
×
×
  • 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.