Hi all , i occur a problem in my forget password page as the page appear as blank page . Can anyone help me find out wt went wrong with my code. -
<?php require_once('Connections/conn.php'); ?>
-
<?php
-
session_start();
-
$PasswordFormAction = $_SERVER['PHP_SELF'];
-
if (isset($accesscheck)) {
-
$GLOBALS['session'] = $accesscheck;
-
session_register('session');
-
}
-
if (!isset($_POST['email'])){
-
$email_address = $_POST['email'];
-
}
-
else {
-
$email_address=mysql_real_escape_string($email_address);
-
$status = "OK";
-
$msg="";
-
-
if (!stristr($email_address,"@") OR !stristr($email_address,".")) {
-
$msg="Your email address is not correct<BR>";
-
$status= "NOTOK";}
-
-
echo "<br><br>";
-
if($status=="OK"){
-
$query="SELECT email_address,username FROM user_profile WHERE email= '$email_address'";
-
$st=mysql_query($query, $conn) or die(mysql_error());
-
$recs=mysql_num_rows($st);
-
$row=mysql_fetch_object($st);
-
$em=$row->email_address;
-
-
if($recs == 0){
-
print "We're sorry, your Email does not appear to be in our database.";
-
}
-
else {
-
-
-
$resultID ="SELECT password FROM user_profile WHERE email = '$email'";
-
$st2=mysql_query($resultID, $conn) or die(mysql_error());
-
$recs2=mysql_num_rows($st2)
-
$row2 = mysql_fetch_array($st2);
-
$passwordfromdb = $row2[0];
-
-
// End of query commands
-
// Send Password to email
-
-
mail($email, "Your Password", "Password: $passwordfromdb", "FROM: fyp@.com");
-
echo "Your Password has been sent to $email ";
-
?>
-
?>
-
4 1454 mwasif 802
Recognized Expert Contributor
There MUST not be any output (or whitespace) before session_start() . Start your file as follows
[PHP]<?php require_once('C onnections/conn.php');
session_start() ;
//rest of your code....
[/PHP]
pbmods 5,821
Recognized Expert Expert
Heya, chaos.
Thanks for using CODE tags! Did you know that you can specify a language for your CODE tags to make your source code easier to read?
You will still need to use [/code] to close your code blocks, regardless of the language, but you can the use one of these tags to open your code block:
[code=html]
[code=javascript]
[code=php]
and so on.
Thanks!
MODERATOR
pbmods 5,821
Recognized Expert Expert
Heya, chaos.
A blank page usually means that your script generated an error.
Check out this article for more information.
thx pbmods for your help!!!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: wASP |
last post by:
Hi,
I'm a newbie starting up with ASP.NET,
and I'm getting off to a wonderful start
- and when I tell you "wonderful" I'm being sarcastic.
My OS is Win 2000 SP4.
I've gotten IIS installed, along with the .NET framework.
|
by: Andrea |
last post by:
Hi,
i've installed OCS Inventory NG for inventory and it has installed
Mysql ver:
mysql Ver 14.12 Distrib 5.0.18, for Win32
now i have to make a dump for save database but don't forget the root
password.
I've try to reset password with resetpassword.bat and also with this
|
by: brett |
last post by:
I'm using ASP.NET 2.0 with roles/memberships. I have one page with
these controls:
- Login
- PasswordRecovery
- CreateUserWizard
After creating a user, I try to login but get an error saying the
attempt was not successful. After a few tries, I try the password
recovery. It sends me a password, which I try. I get the same message
|
by: bb nicole |
last post by:
Below is my forget password, why cannot function?? When i click on the submit button, it still remain on the same page and just like i didn't click anything...
<?php
if($go == "1")
{
mysql_connect("localhost","root","");
mysql_select_db("ums e-job portal");
$sql = @mysql_query("SELECT * FROM company WHERE username='$username' && emailAdd='$email' ");
if(!$sql)
|
by: =?Utf-8?B?QW1qYWQ=?= |
last post by:
I have one question about forget password control with asp.net 2.0
we are using here Groupwise . how can i send email using group wise instead
of SMPT and how to change the setting for or i have to write my own
controller instead of using micrsoft one for forget password thanks
| |
by: =?Utf-8?B?QXhlbCBEYWhtZW4=?= |
last post by:
Hi,
we've got a strange problem here:
We've created an ASP.NET 2.0 web application using Membership.ValidateUser()
to manually authenticate users with our website.
The problem is: If the user has the "User must change password" flag set in
Active Directory, ValidateUser() always returns false if that user wants to
log in.
|
by: rustyc |
last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-)
As I said over there:
... for a little side project at home, I'm writing a ham radio web site in uby/Rails. I started it in Perl and gave up on Perl as I went from the 'display the database information on the web page' to the 're-display the information from the database and allow the user to update the database using the web page' stage and realized...
|
by: harshadd |
last post by:
I have 3000+ exchange users and most of the time they forget the password and we reset it for them. again problem is this happens on phone. so no guaranty that user it self has requested to change/reset the password.
Can any one know if it is possible on MS Exchange, to reset the users email password using some thing like "Forget Password wizard" as we do on yahoo/gmail/hotmail etc. where user has to answer some secret question and will reset...
|
by: dxting |
last post by:
Hi
Can anyone tell me how to write the forget password function in my web page.My web page haven't publish yet. Just using it as local host. Means don't have domain yet.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |