
john010117
-
Posts
492 -
Joined
-
Last visited
Never
Posts posted by john010117
-
-
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"; } } ?>
-
I use the same program. Try to edit PHP in ANSCI mode from now on.
-
Just try:
<?php session_start(); ob_start(); ?>
See if that works.
-
Do you have any error messages? Post the error message here if you do.
-
Did you change the table names and the variable names to what you have? Also, is there any records in the db?
-
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...
-
I believe md5 is the only function that cannot be decrypted (very easily). I use md5 all the time.
-
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.
-
...and click on midterm.html...
Shouldn't it be "midterm.php"?
-
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.
-
What chigley means is that..
First, make a blank file named test.php and save it.
Then, put ONLY this code in the file:
<?php mail("youremail@domain.com", "Test Email", "Testing..."); ?>
After you've done that, go to test.php. You shouldn't get any messages at all. Check your e-mail.
-
I agree. You should only post the relevant part(s) of the code in the correct category.
-
-
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());
-
Oh, right. My bad.
-
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...
-
Trust me, I know what that feels like. But be grateful that I'm not that kind of a person.
-
You can not "physically" add images to a MySQL database.
-
if ($download1 != NULL) { code }
Users Online Type Thing
in PHP Coding Help
Posted
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.