View Full Version : Php Help
civilgaming
04-11-2007, 12:41 AM
Can someone help me with a upload php and a login php? it can be anybody or it can be unlimited mb people, just please help me
MSN is reviewer121@hotmail.com
Once again.........I hate these posts.
People come, leave a post with their emails thinking we'll take the time to email them with an answer...
Anyways, back to the topic.................an Upload php? Do you mean so people can upload to the server? Sorry that's not allowed.
arenlor
04-12-2007, 04:29 AM
They're allowed to upload through scripts, I think it's 500 KB max, but you can't host a download server.
Come back and ask us politely instead of begging please. For now:
<?php $username = $_POST['username'];
$password = $_POST['password'];
$logged = $_COOKIE['cookie'];
if($logged == 1){
echo "<p>You're already logged in.</p>";
}
else if($username != '' && $password != ''){
@mysql_connect('mysql','####_dbname','your_passwor d');
@mysql_select_db('####_dbname');
$query = "select count(*) from table where username = '$username' and password = '$password'";
$result = mysql_query($query);
$count = mysql_fetch_array($result);
if($count['COUNT(*)'] == 1){
echo "<p>You logged in.</p>";
setcookie("cookie",1,time()+1800);
}
}
else{
echo "<form action=\"$PHP_SELF\" method=\"post\"><input type=\"text\" name=\"username\" /><input type=\"password\" name=\"password\" /><input type=\"submit\" value=\"login\" /></form>";
}?>
That will either print out the login form, or if logged in set a cookie and display a text. If the cookie is set (which it'll only be set for 30 mins) it'll display that they already logged in. Season to taste.
gmrcvt
05-08-2007, 03:36 PM
OUCH!!!
That's some harsh....ummm.....support.
cr0wonline
05-08-2007, 09:49 PM
OUCH!!!
That's some harsh....ummm.....support.
It's not being harsh, it's just that people come to the forum looking for help, so already we're going out of our way to help the person. Then, they can't even show the respect to come back once a day to check for updates...they'd rather do nothing and have us find them.
It's not being harsh, it's just that people come to the forum looking for help, so already we're going out of our way to help the person. Then, they can't even show the respect to come back once a day to check for updates...they'd rather do nothing and have us find them.
Exactly. They expect us to go out of our own way and find them the answer, then email it to them....
gmrcvt
05-09-2007, 01:42 PM
Exactly. They expect us to go out of our own way and find them the answer, then email it to them....
I see your point. That is why I am back again, today. You all are so kind to help out other people, I don't think you should have to go looking for them either. :)
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.