john010117
Members-
Posts
492 -
Joined
-
Last visited
Never
Everything posted by john010117
-
Since I don't know the structure of your forum, I can't quite say. But the basic idea would be to have a column in your users and/or sessions table named $logged_in, and the only values would be 1 for true and 0 for false. Then, run a mysql_query on the table WHERE logged_in = 1.
-
I was wondering the same thing myself. I'm guessing for your situation, put that in a seperate file (let's say "session_check.php") and include/require it through all the secure pages.
-
<?php include("config.php"); mysql_connect($db_host, $db_user, $db_pwd); mysql_select_db($db_name); if (!$_POST) { include("form.php"); } else { $formbody = $_POST['formbody']; $sql = "SELECT $db_usernamefield, $db_emailfield FROM $db_table"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)){ $username = $row['username']; $email = $row['email']; $body = "$formbody"; $body = str_replace("[username]", $username, $body); mail($email, $emailsubject, $body, "From: $fromname <$fromemail>"); if(mail ($email, $emailsubject, $body, "From: $fromname <$fromemail>")) echo "Messages sent"; } } ?>
-
Do you have any error messages? Post the error message here if you do.
-
[SOLVED] php/mysql checking for duplicates in database
john010117 replied to laron's topic in PHP Coding Help
Did you change the table names and the variable names to what you have? Also, is there any records in the db? -
understanding php processing and page output order
john010117 replied to vanderlay's topic in PHP Coding Help
First of all, please wait at least an hour before bumping. It really annoys those who are trying to help you. We do have lives you know... -
[SOLVED] what is more secure( password or SHA-1) function???
john010117 replied to cluce's topic in PHP Coding Help
I believe md5 is the only function that cannot be decrypted (very easily). I use md5 all the time. -
can anyone tell me why i dont recieve mail?
john010117 replied to Papalex606's topic in PHP Coding Help
Ok. So that means you're website is hosted by someone else. Contact the administrator, and see if they actually have SMTP enabled. -
Is $member defined in any part of your script? You said: WHERE username='$member' in $query1, but I didn't see that defined earlier on.
-
Under "server configuration", it says: // Note: dont include http:// Yet you did.
-
Well, we can't help you if don't show us some of the code that you have.
-
I agree. You should only post the relevant part(s) of the code in the correct category.
-
Here are some useful links for you: Sessions set_cookie
-
I don't know if this will help, but try changing the mysql_query to look for both the username AND the password. If it didn't find a match (using mysql_num_rows), return false. Otherwise, return true. Here's the query: $check = mysql_query("SELECT * FROM users WHERE username = '$username' AND password = '$password'")or die(mysql_error());
-
Similar to utube.com. How are liveleak and utube able to get them videos? I believe you have to know a bit of flash to make that.
-
LOL I like how he says at the end that there was three things he was afraid of: "electricity, height, etc.".
-
Geez... I'd hate to be in one of the cars while it was exploding...
-
no courtesy when one responds
john010117 replied to suzzane2020's topic in PHPFreaks.com Website Feedback
Trust me, I know what that feels like. But be grateful that I'm not that kind of a person. -
[SOLVED] Selecting values that are not null
john010117 replied to Richzilla's topic in PHP Coding Help
if ($download1 != NULL) { code }