Jump to content

lordbob

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lordbob's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. iv gone through all of that stuff, the mime stuff and the other extra headers, nothing works :(
  2. does anyone know a way around this problem? at the moment the only stuff i have found is either wrong or i cant understand it! HELP ME!!!!!  :-\
  3. yer iv browsed google and everyone seems to be having this problem when sending to hotmail/gmail/yahoo etc.
  4. if it doesnt work for hotmail then im pretty screwed because all the people who are registering use hotmail  :-\
  5. yeh im using hotmail, i checked junk...nothing there
  6. there is no error message, it says "email sent" but i dont get it  :-\
  7. its $Email how do i turn off global thingy? and will that effect other php files on my website that send variables like that?
  8. $email is sent from forgot.html (the form page)
  9. yer woops sorry about that  :P
  10. I am trying to make a 'forgot password' tool on my website, basically the person fills out an HTML form which is then sent to a php file called forgot.PHP (they send $Email to the PHP file via GET method) this is my code for forgot.php: [code]<? //-------------------------------------------Connect to Database: //set the variables as required $dbhost = "fdb1.awardspace.com"; $dbuser = "rocketeermus_db1"; $dbpass = "******"; $dbname = "rocketeermus_db1"; //do not edit this, it connects the script $members = mysql_connect($dbhost,$dbuser,$dbpass);//line10 mysql_select_db($dbname) or die(mysql_error()); //------------------------------------------------------------------Send Mail Bit $sql="SELECT Password, Username FROM Members WHERE Email='$Email'"; $result=mysql_query($sql);//line20 $count=mysql_num_rows($result); if($count==1){ $rows=mysql_fetch_array($result); // keep password in $your_password $your_password=$rows['Password']; $your_username=$rows['Username']; $subject = "Password Request";//line30 $body = "Your password request has been processed!\n\nUsername: $your_username\nPassword: $your_password"; if (mail($Email, $subject, $body)) {   echo"<p>Message successfully sent!</p>"; } else {   echo"<p>Message delivery failed...</p>"; } } else { echo"<p>Your email address was not found on our database, you must register first!</p>"; } ?>[/code] does anyone know why it isnt sending the email? thanks ~
  11. :o :o :o :o :o :o :o IT WORKS THE MACHINE WORKS thankyou thankyou etc... this is my first php/mysql database and iv finally done that bit woo! thankyou all and i shall continue my journey into the strange and confusingish world of PHP!!
  12. didnt i do that printf thinf in the login.php? and also how do you store a page of html in a php variable
  13. ok here goes: [code]<? //set the variables as required $dbhost = "***********"; $dbuser = "*************"; $dbpass = "***********"; $dbname = "*************"; //do not edit this, it connects the script $members = mysql_connect($dbhost,$dbuser,$dbpass);//line10 if(!$members) //error checking :D         {             echo "<p>Sorry! We could not log you in at this time. Please Try again later!</p>";         } mysql_select_db($dbname) or die(mysql_error()); $username = $_POST["Username"]; //get the username from the form, as $username $password = md5($_POST["Password"]); //line20 get the password from the form in md5 $recieve = sprintf("SELECT * FROM Members WHERE Username='%s' AND Password='%s'", mysql_real_escape_string($Username), mysql_real_escape_string($Password)); //this is the "query", which selects the row where memebername=the one entered, and the same for the password $query = mysql_query($recieve); //do the query session_start(); if($rows = mysql_num_rows($query)) //line30 if the query resulted with a row, start the sessions and go to the index {     $_SESSION['login'] == $Username;     header("location: main.php"); } else //if not, end incorrect sessions, and go to the index {     session_destroy();     header("location: error.html"); //return to login } ?>[/code] main.php: (i renamed it php instead of .html in an attempt at making it work but no success :() [code]<? if(isset($_SESSION['login'])) { //raw html code (is this wrong?) } else { header("location: index.html");   echo "You must be logged in to view this page."; } ?> [/code] as for the html code, its just raw html, im assuming this is one of the problems, how do you set a whole page of html to a php variable?
  14. and it wont let me put html in php tags
  15. that doesnt work  :-[ its still doing whatever is in the else block  >:(
×
×
  • 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.