 |
Account Login
|
 |
 |
Latest Articles
|
 |
 |
IRC Channel
|
 |
 |
Associates
|
 |
 |
Associates
|
 |
|
 |
|
 |
|
 |
01-04-2008, 12:37 AM
|
#21 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
The exact same problem? Please post your updated code as it is right now.
|
|
|
|
01-04-2008, 03:28 PM
|
#23 (permalink)
|
|
The Frequenter
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
|
Unfortunately it looks like your website is offline again.
As Salathe asked, can you post the current PHP code that you are using that generated the last batch of errors you posted?
Alan.
|
|
|
01-04-2008, 03:43 PM
|
#24 (permalink)
|
|
The Addict
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
|
PHP Code:
<?php
include("config.php") ;
if (isset($_POST['user']) && isset($_POST['password'])){
$user = $_POST['user'];
$pass = $_POST['password'];
$query = "select * from members where user='$user' and pass='$pass'" ;
$result = mysql_query($query) ;
$count = mysql_num_rows($result) ;
if ($count == 1) {
$timestamp_expire = time() + 365*24*3600; // Le cookie expirera dans un an
setcookie('user', ($_POST['user']), $timestamp_expire); // On crit un cookie
setcookie('pass', md5($_POST['password']), $timestamp_expire); // On crit un cookie
echo '<meta http-equiv="refresh" content="0;url=user_p.php" />';
}
else echo 'le pass ke vs aves etres est faux';
}
else{
?>
<table border=0 ><caption>member login</caption>
<form action="" method="post">
<tr><td><b>pseado</b><td><input type="text" name="user" ></tr>
<tr><td><b>mot de passe</b><td><input type="password" name="password" ></tr>
<tr><td><input type="submit" value="Entrer" ></tr>
</table>
<?php } ?>
the errors are header errors  
|
|
|
01-04-2008, 03:58 PM
|
#25 (permalink)
|
|
The Addict
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
|
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/www/webtutotest.freehostia.com/news/login.php:1) in /home/www/webtutotest.freehostia.com/news/login.php on line 13
Warning: Cannot modify header information - headers already sent by (output started at /home/www/webtutotest.freehostia.com/news/login.php:1) in /home/www/webtutotest.freehostia.com/news/login.php on line 14
|
|
|
01-04-2008, 04:11 PM
|
#26 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Check your config, is there ANY 'echo' or 'print' or 'print_r' command in it? If you, you deserve a smack to the head. 
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
01-04-2008, 04:18 PM
|
#27 (permalink)
|
|
The Addict
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
|
lol my config douesnt have that
|
|
|
01-04-2008, 04:20 PM
|
#28 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
Any space after your closing PHP tag (?>)? Even a single space would give you problems.
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|
01-04-2008, 04:55 PM
|
#29 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Quote:
Originally Posted by Wildhoney
Any space after your closing PHP tag (?>)? Even a single space would give you problems.
|
And check for any possible bugs in defining your variables. Header functions like setcookie and ofcourse header itself are over-sensitive for those things.
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
01-04-2008, 04:59 PM
|
#30 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Florida
Posts: 73
Thanks: 12
|
Oh and, er, the correct spelling for "douesnt" is "doesn't".
Sorry it was bugging me quite a bit. :p
Also, I know this is a terrible tip, but if you were lazy and just wanting to see the stupid script working explore output buffering. Gets rid of the header() issue's. Although an easy fix is just get rid of ANY data going to the browser, even white space counts, and any echo's or prints in php.
|
|
|
|
The Following User Says Thank You to danielneri For This Useful Post:
|
|
01-04-2008, 05:03 PM
|
#31 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Quote:
Originally Posted by danielneri
Oh and, er, the correct spelling for "douesnt" is "doesn't".
Sorry it was bugging me quite a bit. :p
Also, I know this is a terrible tip, but if you were lazy and just wanting to see the stupid script working explore output buffering. Gets rid of the header() issue's. Although an easy fix is just get rid of ANY data going to the browser, even white space counts, and any echo's or prints in php.
|
At least, if you are such as perfectionist, he spelled 'full' instead of 'fill'.  And no, on a short notice, I didn't pay attention to any other grammar.
Anyways, make sure you have NOOOOOOOOOOOOOOOOOO output BEFORE a header or ob_ function. Check your browsers html source (most have CTRL+U) and if it has ANYTHING before the errors, that is where you need to be.
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
01-04-2008, 05:14 PM
|
#32 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Florida
Posts: 73
Thanks: 12
|
Quote:
|
At least, if you are such as perfectionist, he spelled 'full' instead of 'fill'. And no, on a short notice, I didn't pay attention to any other grammar.
|
Wait what? full? fill? I'm lost. lol
|
|
|
01-04-2008, 05:30 PM
|
#33 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Quote:
Originally Posted by danielneri
Wait what? full? fill? I'm lost. lol
|
IF you post, please look thurowly through his script, then you know what I am talking about.
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
|
The Following User Says Thank You to ReSpawN For This Useful Post:
|
|
01-04-2008, 05:35 PM
|
#34 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Florida
Posts: 73
Thanks: 12
|
Oh yeah forgot about the first page when I posted. haha
trust me I'm not much of a perfectionist, it just sorta annoys me when people use bad grammar, but it's alright because this dudes French anyway
|
|
|
01-04-2008, 05:52 PM
|
#35 (permalink)
|
|
The Addict
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
|
english is not my native language neither frensh
im arabic :p
about the error it is fixed lol sorry the problem was that i used UTF-8 and i should use ANSI
about these grammar errors im gonan fixed them too
here is the script if u wanna give ut a try => http://webtutotest.freehostia.com/news/home.php
|
|
|
01-04-2008, 06:14 PM
|
#36 (permalink)
|
|
The Contributor
Join Date: Dec 2007
Location: Florida
Posts: 73
Thanks: 12
|
great! glad you fixed it =)
I feel like a prick for pointing out the grammar errors lol sorry mate.
|
|
|
01-04-2008, 06:17 PM
|
#37 (permalink)
|
|
The Addict
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
|
lol no mate , its like learning both php and english grammar cool
|
|
|
01-04-2008, 11:07 PM
|
#38 (permalink)
|
|
The Frequenter
Join Date: Nov 2007
Location: Netherlands
Posts: 460
Thanks: 49
|
Simply keep hanging around here. I learned most of my English from the Internet and games when I was about 12 years old, so that's about 7 years ago.
As a matter of fact, everything you learn, you should put into practice. That way, you get a good grasp of the code and the language.
Glad it worked out.
__________________
"Life is a bitch, take that bitch on a ride"
|
|
|
01-04-2008, 11:26 PM
|
#39 (permalink)
|
|
The Addict
Join Date: Dec 2007
Location: morocco
Posts: 221
Thanks: 19
|
thanks for the post respawn , where ra u from then !
i learned english from movies lol
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|