Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. add $login_fail="true"; at the top (before the if)
  2. OK.... add <?php print_r($row); ?> at the end
  3. OK 1. next time please post in the [ code] tags 2. add this to the top of the page. <?php echo "GET="; print_r($_GET); echo "<BR>POST="; print_r($_POST); ?> EDIT: and show us the result
  4. I got an email after i messedup a script caused an inf.loop, i fixed the bug right after but shortly after i got an email.. i understand why they complaind and the service is good downloading can be a little slow at times.. i may try out ace-host.net as i have heard nothing but good things
  5. change $User_Exists = mysql_query("SELECT table_id, rest_username, rest_pass, contact_fname FROM abc_tables WHERE rest_username='".$_POST['$username']."' AND rest_pass = '".$_POST['password']."', $db_link); to $User_Exists = mysql_query("SELECT table_id, rest_username, rest_pass, contact_fname FROM abc_tables WHERE rest_username='".$_POST['$username']."' AND rest_pass = '".$_POST['password']."'", $db_link); end "
  6. change to <?php session_start(); // dunno if the or is correct here... if(isset($_POST['submit']) || isset($_POST['FrontPage'])) { include('db_con.php'); // also not suer where $id comes from? $User_Exists = mysql_query("SELECT table_id, rest_username, rest_pass, contact_fname FROM 123_table WHERE rest_username='".$_POST['$username']."' AND rest_pass = '".$_POST['password']."' AND table_id = '".$id."'", $db_link); $exists = mysql_num_rows($User_Exists); $row = mysql_fetch_array($User_Exists); if($exists) { $_SESSION['track_id'] = $row['table_id']; $_SESSION['track_name'] = $row['contact_fname']; echo '<script type="text/javascript"> location="home.php" </script>'; }else{ $login_fail="true"; } } } ?> EDIT: was missing the end }
  7. well freehostia (which is who i think your with) have 3xemail accounts even on the free accounts.. their might be something you need to check in the cPanel or something, as you can probably tell i didn't get the email:( try contecting them or check the their FAQ's anyways i have to get some sleep (3am here in the UK) Well Elaine i hope you find a solution, if not i'll see if i can think of anything else to try good luck -MadTechie
  8. What about <?php if( isset($_GET['last_name']) && isset($_GET['first_name']) ) { $OP = "AND" }else{ $OP = "OR" } $query = "SELECT id, first_name, last_name FROM users WHERE first_name LIKE '$name' $OP last_name LIKE '$name' ORDER BY first_name"; $result = mysql_query($query); ?> EDIT: thorpe just kicked my *****
  9. try my email it works on my tests madtechie3000@yahoo.co.uk if it fails then i guess your need to ask the host provider
  10. what about the lines $mysql = new mysql(); $mysql->connect(); they seams incompleate as i see no include
  11. confirmation should mean its was sent.. have you tried another email address ? checked the junk mail folder etc?
  12. oops sorry i should of checked thats first here try this (i tested it) <?php $email_address = "email@ghdagsdhj.com"; $subject = "Test"; $message = "Please Work"; $from = "From: The Truth Discovered Webmaster< admin@mydomain.com> X-Mailer: PHP" . phpversion(); $mailcheck = mail($email_address, $subject, $message, $from); if($mailcheck) { echo "Your password has been sent! Please check your email!<br />"; }else{ echo "email..failed<br />"; } ?>
  13. create a file called testmail.php and copy and past the following into it <?php $email_address = "your@email.com"; $subject = "Test"; $message = "Please Work"; $from = "From: The Truth Discovered Webmaster< admin@mydomain.com> X-Mailer: PHP/" . phpversion()" $mailcheck = mail($email_address, $subject, $message, $from); if($mailcheck) { echo "Your password has been sent! Please check your email!<br />"; }else{ echo "email..failed<br />"; } ?> change your@email.com to your email save upload to server and run.. see if it work.. also check your junk mail folder
  14. you can but its not easy your need to use fsockopen
  15. I assume you got the message saying it was sent.. try another script mailtest.php $email_address = "your@email.com"; $subject = "Test"; $message = "Please Work"; $from = "From: The Truth Discovered Webmaster< admin@mydomain.com> X-Mailer: PHP/" . phpversion()" $mailcheck = mail($email_address, $subject, $message, $from); if($mailcheck) { echo "Your password has been sent! Please check your email!<br />"; }else{ echo "email..failed<br />"; } try that first see what happens
  16. Have you tried replacing REQUEST with _GET ?
  17. or using Caesar nice example you could use this code Caesar check the isset (GET?) <?php if (isset($_GET['page'])) { switch($_GET['page']) { case 'login': include'login.php'; break; case 'news': include'news.php'; break; case 'members': include'members.php'; break; default: include'main.php'; break; } } ?>
  18. ok add this to the form <input type=hidden name='recover' value='recover' size=30> as its not being set anywhere
  19. <?php if (isset("".$_GET['page'].".php")) ?> "".$_GET['page'].".php" isn't a variable it should be something like <?php if (isset($_GET['page'])) ?>
  20. Huh <?php if (isset("".$_GET['page'].".php")) ?>
  21. are the form and the script on the same page ? if not then thats the problem as the form is calling itself if they card can you post the whole page (in [ code] tags)
  22. OK try this <?php include 'db.php'; switch($_POST['recover']){ default: include 'lostpsw.php'; break; case "recover": recover_pw($_POST['email_address']); break; } // Everything looks ok, generate password, update it and send it! function makeRandomPassword() { $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*1000000); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } function recover_pw($email_address){ if(!$email_address){ echo "You forgot to enter your Email address"; include 'lostpsw.php'; exit(); } // quick check to see if record exists $sql_check = mysql_query("SELECT * FROM users WHERE email_address='$email_address'"); $sql_check_num = mysql_num_rows($sql_check); if($sql_check_num == 0){ echo "No records found matching your email address<br />"; include 'lostpsw.php'; exit(); } $random_password = makeRandomPassword(); $db_password = md5($random_password); $sql = mysql_query("UPDATE users SET password='$db_password' WHERE email_address='$email_address'"); $subject = "Your Password at The Truth Discovered!"; $message = "Hi, we have reset your password. New Password: $random_password http://www.thetruthdiscovered.com/login.php Thanks! The Webmaster This is an automated response, please do not reply!"; mail($email_address, $subject, $message, "From: The Truth Discovered Webmaster< admin@mydomain.com>\n X-Mailer: PHP/" . phpversion()); echo "Your password has been sent! Please check your email!<br />"; include 'login.php'; } ?>
  23. Working ? If so please click solved (bottom left)
  24. you are missing the form tags whats in header.php ? try adding <form action="nameOFscript.php" method="POST"> after header.php and </form> before footer.php
  25. Anyways what part fails ? the update or the email ? EDIT also do header.php & footer.php have <form action blar blaR> and </form>
×
×
  • 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.