cluce
-
Posts
354 -
Joined
-
Last visited
Never
Posts posted by cluce
-
-
thansk for the replies
-
I have a web site hosted on IIS under netpub. My html pages display correctly but my php web pages are not showing only the code is being displayed. Can someone tell me why my php is not being interpreted?
-
well I wanted something free. I know some of them cost a little bit. I have found freeBSD on the web that looks interesting
-
I currently have a php and mysql datadriven website. It works fine on my local machine(WIndows) but when I publish it to the web I get a MySQL connection error. So decided I want to install UNIX on a virtual PC and give that A try. UNIX anad LINUX is all new to me. Can somone recommend a version of UNIX and where to download it?
-
yes. I think this will work. I can have a "key" colunm that is set to 1 when they submit there email requesting a password change. and that key will grant them access to change their password. And when there password is changed that key value is set to 0 until the next time they decide to chang their password again.
-
that may work? if that will disable the form after they submit it. As long as they cant change the password a second time that will work.
-
try using this to help guide you in the email form. I am new to php and I found these tutorials to be very helpful. I usually start with a simple exercise before I do a more complex form.
http://www.w3schools.com/php/php_mail.asp
-
I have a forgot password form that allows a user to submit their email then a link to a page to reset their password is sent to that email. On this page I have them submit their email and enter in a new password which works fine. But is there any way I could disable this page so the user cant get access to change their password again unless they submit another request to change their password. In other words, I want them to use that link only once and thats it.
If so can someone give me some ideas on how to do this?
-
can I use php and apache to host my website on a windows client for others to view? If so, can someone tell me how to publish this for others to view through their internet browser? We are all on the same network. I dont have to publish it publicly just host it for other users on the same domain as me will work for now. I am trying to get my manager to look at on his machine instead of mine.
-
thanks for you replies.
-
well I am doing all my testing on my localhost.
-
I just need some input from some php experts. I was using the @ symbol in my code and when I posted my code on here. Someone told me it was bad programming but when I did a google search on adding security to you php website. It was suggested to use @ to prevent the hacker from seeing your potential error in your website in the browser window. can someone give me your opinon on this? or any ideas/tips on how to secure php wen pages?
-
I am using IIS to host my website. I have a logon page that asks for the user's username and password. My website works when I use Apache and run it on my local machine but when I host it over the web through IIS I receive an error when I try to logon which is connected to mySQL. Error...Fatal error: Call to undefined function mysqli_connect() in C:\Inetpub\wwwroot\userlogin.php on line 14.
Can someone tell me how I can configure my settings so the user can log on via web and connect to the database. I would greatly appreciate it.
-
thanks for the reply. I think my code is right too. For some reason the mail server doesn't wont to relay the message externally.
It does send email just not to my external accounts(ex. gmail, yahoo,etc.). It only sends the messges to my company email accounts.
-
ok here is the code......
<?php //initialize the session if (!isset($_SESSION)) { session_start(); } //connects to database $mysqli = mysqli_connect("localhost", "root", "", "test"); //check to see if email exists in database/table $usercheck = strip_tags(trim($_POST['email'])); $check = mysqli_query($mysqli,"SELECT email FROM auth_users WHERE email = '$usercheck' LIMIT 1"); $check2= mysqli_num_rows($check); //if the email does not exist, it gives an error if ($check2 != 0) { //create and issue the query $sql = "SELECT username, password FROM auth_users WHERE email = '".$_POST["email"]."' LIMIT 1"; $res = mysqli_query($mysqli, $sql); $bodyArr = mysqli_fetch_array($res); //send query through email $to = $_POST["email"]; $subject = "Account Information"; $body = "Username: " . $bodyArr['username'] . "\nPassword: " . $bodyArr['password']; mail ($to, $subject, $body); header("Location: http://localhost/Account_information.html"); }else{ $_SESSION['emailExists'] = "<font color='red'>The email"." ".$_POST['email']." "."does not exist in our database.<br>You may register for free by filling out the online registration form.</font>"; header ("Location: forgot_password.php"); } mysqli_close($mysqli); ?>
-
my situation: I am in an internal network that is using our company's SMTP. I am working on a forgot password page for our website. When I type in an email and submit it it verifies that the email is in the database and sends that email account the username and password.
This only works with the company's email accounts such as me@company.com but when I use me@yahoo.com it does not send the username and password. I receive these errors....
Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for me@yahoo.com in C:\wamp\www\email_info.php on line 28
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\email_info.php:28) in C:\wamp\www\email_info.php on line 30
can someone tell me what the problem may be????
-
that function looks complicated.
-
oh OK. I was wondering what reversed meant. Thanks for clearing that up.
-
my code works great. The little problem I have is its not returning the password only the hash form of it. Can someone show me where to insert the md5 function. I tried everywhere I can think of...
//create and issue the query $sql = "SELECT username, password FROM auth_users WHERE email = '".$_POST["email"]."' LIMIT 1"; $res = mysqli_query($mysqli, $sql); $bodyArr = mysqli_fetch_array($res); $to = $_POST["email"]; $subject = "Account Information"; $body = "Username: " . $bodyArr['username'] . "\nPassword: " . $bodyArr['password']; mail ($to, $subject, $body);
-
I got this working. Thanks.
-
OK I added those lines but now I get these......
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, object given in C:\wamp\www\email_info.php on line 22
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\email_info.php:22) in C:\wamp\www\email_info.php on line 30
<?php //initialize the session if (!isset($_SESSION)) { session_start(); } //connects to database $mysqli = @mysqli_connect("localhost", "root", "", "test"); //check to see if email exists in database/table $usercheck = @strip_tags(trim($_POST['email'])); $check = @mysqli_query($mysqli,"SELECT email FROM auth_users WHERE email = '$usercheck' LIMIT 1"); $check2= @mysqli_num_rows($check); //if the email does not exist, it gives an error if ($check2 != 0) { //echo ("email exists"); //create and issue the query $sql = "SELECT username, password FROM auth_users WHERE email = '".$_POST["email"]."' LIMIT 1"; $res = mysqli_query($mysqli, $sql); $bodyArr = mysqli_fetch_array($mysqli, $sql); $to = $_POST["email"]; $subject = "Account Information"; $body = "Username: " . $bodyArr['username'] . "\nPassword: " . $bodyArr['password']; mail ($to, $subject, $body); header("Location: http:company.com/Account_information.html"); }else{ $_SESSION['emailExists'] = "<font color='red'>The email"." ".$_POST['email']." "."does not exist in our database.<br>You may register for free by filling out the online registration form.</font>"; header ("Location: forgot_password.php"); } mysqli_close($mysqli); ?>
-
I am trying to do a forgot password page that will email the person his username and password based on the email submitted. Here is the errors I am getting...
Warning: mail() expects parameter 3 to be string, object given in C:\wamp\www\email_info.php on line 26
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\email_info.php:26) in C:\wamp\www\email_info.php on line 28
I think it something to do with converting the $res - $body but I am not sure?
Can someone tell me whats wrong?
here is the code I am use......
<?php //initialize the session if (!isset($_SESSION)) { session_start(); } //connects to database $mysqli = @mysqli_connect("localhost", "root", "", "test"); //check to see if email exists in database/table $usercheck = @strip_tags(trim($_POST['email'])); $check = @mysqli_query($mysqli,"SELECT email FROM auth_users WHERE email = '$usercheck' LIMIT 1"); $check2= @mysqli_num_rows($check); //if the email does not exist, it gives an error if ($check2 != 0) { //echo ("email exists"); //create and issue the query $sql = "SELECT username, password FROM auth_users WHERE email = '".$_POST["email"]."' LIMIT 1"; $res = @mysqli_query($mysqli, $sql); $to = $_POST["email"]; $subject = "Account Information"; $body = $res; mail ($to, $subject, $body); header("Location: http:mydomain.com/Account_information.html"); }else{ $_SESSION['emailExists'] = "<font color='red'>The email"." ".$_POST['email']." "."does not exist in our database.<br>You may register for free by filling out the online registration form.</font>"; header ("Location: forgot_password.php"); } mysqli_close($mysqli); ?>
-
sorry forf being vague.
-
oops I thought I was in phph help. thanks
php web page is not displaying; only the code shows
in Microsoft IIS
Posted
this is weird. it displays this <?php phpinfo(); ?> correctly. But all my other pages wont display. It either shows code in IE or it opens the php file in notepad. ???