Jump to content

quasiman

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by quasiman

  1. What's funny to me is that I only have this problem when I use a valid email address in the DB. Fake or invalid addresses give me the correct messages.
  2. Yeah, sorry - should have been more clear...in the last else: } else { echo "failed<br>"; print_r($errors); var_dump($errors); echo $lostEmail . $subject . $txt . $headers . "<br>"; }
  3. I tried adding print_r($errors), and all I get is Array ( ) tried adding var_dump($errors), and I get array(0) { }
  4. Can someone take a look at this and see if there's anything wrong with it? I'm just not seeing a problem, but it gives the error below everytime! //Lost password if (isset($_POST['lostEmail']) && isset($_POST['lostSubmit'])) { $lostEmail = trim($_POST['lostEmail']); if (!filter_var($lostEmail, FILTER_VALIDATE_EMAIL)) $errors['invalidEmail'] = 'Your email address is invalid.'; $query = 'SELECT * FROM users WHERE email = "' . mysql_real_escape_string($lostEmail) . '" LIMIT 1'; $result = mysql_query($query); if (mysql_num_rows($result) <> 1) $errors['noEmail'] = 'This email address does not exist.'; // Probably this if statement.... if (!errors) { $newPassword = "newtestpassword"; $subject = "Lost Password Request"; $txt = "Someone (hopefully you) requested a new password on your hehalf \r \n Login: " . $lostEmail . "\n Password: " . $newPassword . " \r \n Thank you!"; $headers = "From: [email protected]"; if (mail($lostEmail, $subject, $txt, $headers)) { $success['passwordSent'] = "Mail sent successfully"; } else { $errors['passwordSent'] = "Mail failed to send"; } } else { echo "failed<br>"; echo $lostEmail . $subject . $txt . $headers . "<br>"; } } ?> <form class="box400" name="lostPassword" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <h2>Lost Password</h2> <?php if ($errors['invalidEmail']) print '<div class="invalid">' . $errors['invalidEmail'] . '</div>'; ?> <?php if ($errors['noEmail']) print '<div class="invalid">' . $errors['noEmail'] . '</div>'; ?> <label for="lostEmail">Email Address</label> <input type="text" name="lostEmail" value="" /> <input type="submit" name="lostSubmit" value="Lost Password" /> <?php if ($success['passwordSent']) print '<div class="valid">' . $success['passwordSent'] . '</div>'; ?> <?php if ($errors['passwordSent']) print '<div class="invalid">' . $errors['passwordSent'] . '</div>'; ?> </form> The only return I get is: failed [email protected]
  5. Hello, this is regarding Extplorer at http://extplorer.sourceforge.net I'm trying to add a TinyMCE editor for people not used to writing content in HTML, and so I've added a popup window link to 'edit_area_full_with_plugins.js': <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]<a href=\"javascript:void(0);\" name=\"newWindow\" title=\"Child Window\" onClick=\"window.open('tinymce/wysiwyg.html','newWindow','width=700, height=350,left=150,top=200,toolbar=no,resizable=false')\">WYSIWYG Editor</a></div> This pops up my window fine, but I can't seem to post back to the EditArea form. Here's my post script and form....what am I doing wrong? <script type="text/javascript"> function post_value(){ opener.document.form.textarea.value = newWindow.document.frm.elm1.value; self.close(); } </script> <form name="frm" method="post" action=""> <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%"> </textarea> <br /> </form> <input type="button" value="Submit" onclick="post_value();"> </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.