Jump to content

burnside

Members
  • Posts

    541
  • Joined

  • Last visited

Everything posted by burnside

  1. so what i need to do to get it to work?
  2. i dont quite understand what you mean
  3. yeah but ill need to check every page so if not logged in they wont be able to acsess the pages wont i?
  4. odisey : it doent work i treid all that its got me.
  5. no doesnt work sorry just echo " bla bla bla ";
  6. how you mean?? $_SESSION(username) ?? any help would be gret.
  7. i am working on a small login script for a site i am working on. Problem is it wont display the information. the code is : Checklogin.php <?php $title = "SeverancE Dawn of Destruction - Login Security "; include("connect.php"); // username and password sent from signup form $username=$_POST['username']; $password=$_POST['password']; $sql="SELECT * FROM users WHERE username='$username' and password='$password'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" session_register("myusername"); session_register("mypassword"); header("location:login_success.php"); } else { include("indextop.php"); echo "<strong><font color=\"black\">Unable to login</font></strong><br /> <br /><ul><li>wrong username supplied</li><br /><li>wrong password supplied</li></ul><br /><br /><center><a href=index.php>back</a></center>"; include("indexbottom.php");} ?> witch works and loges you in if the information is correct. But the file below seems to be the problem login_success.php <? session_start(); if(!session_is_registered(username)){ header("location:main_login.php"); } $title = "SeverancE Dawn of Destruction - Members area"; $page = "Login Area"; include("connect.php"); include("top.php"); $check = mysql_query("SELECT * FROM users WHERE username = '$myusername'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) echo " blah blah $info[username <-- [color=red]SOULD display username[/color]]"; include("bottom.php"); ?> it should display the username but doesnt do any thing. [code] [/code]
  8. i have seen it about a few times what does it menaS? User Enumeration? ???? ?
  9. im new too hahaha, i think i know what you mean ilL have a go for you.
  10. looking throught the code you have missed < out about 3 times and alson a few ;
  11. Sorry i didnt mean to offend, i have some jelly tots for you.
  12. Hey click topic solved if you been helped please. And OMG havent hear love you lots like jelly totts for years!!!
  13. Hey all, i think this is in the right topic if not feel free to move it please, my query is , Is it possable to add a image in a drop down menu?
  14. That works. thank you very much,
  15. Hey thank you, Sorry i posted in the wrong forum, hope your not mad at me,
  16. yeah sumit like that, i mean say for example, if a option was : <select> <option>high</option> <---- background red <option>medium</option> <---- background green <option>low</option> <---- background yellow </select> if yo know what im trien to say hahaha
  17. Hi i was woundering is it possable to change the color of a drop down menu? Ill try explane , <select> <option>red</option> <option>blue</option> <option>black</option> </select> is it possable to like change the background of the option? If you get what im trien to say sorry im not to good at explaning
  18. Hey, i was just woundering can you disable people closing your web page by clicking on the X at the top right hand side of the page? if so how would you do it?
  19. Hey sent you mail soplex ill give you a hand if you want?
  20. So can any one give me any hints please?
  21. Sorry, My bad new to all this, when i click the link to edit the details the name apears in the text box, but when i edit the name and click update nothing happens it should post name changed the change the name in the database but it does nothing when i click update just takes me back the the cont.php file. Sorry not much help.
  22. Can any one see any reason this isnt working ? doesnt seem to change any thing or ot its got me stumped echo " <Tr><Td>Username <td>:<td>$info[username] <a href=cont.php?action=name>Edit</a></td> "; if ($_GET[action] == "name"){ if(!$_GET[change]){ echo "<br><form action=cont.php method=post>"; echo "<input type=hidden name=action value=name>"; echo "New Name: <input type=text size=30 name=change value=\"$info[username]\"><br>"; echo "<input type=submit value=Update></form><p>"; echo "<br><br><center>[<a href=cont.php>Back</a>]</center>"; }else{ $change = trim($change); $first = ord(substr($change,0,1)); if((strlen($change) > 20) || (strlen($change) < 4)){ echo "Username must be between 4 and 20 characters."; echo "<br><br><center>[<a href=cont.php?action=name>Back</a>]</center>"; }elseif(substr($change,0,1) == " "){ echo "Username can not start with a space."; echo "<br><br><center>[<a href=cont.php?action=name>Back</a>]</center>"; }elseif(substr($change,0,1) == "."){ echo "Username can not start with a dot."; echo "<br><br><center>[<a href=cont.php?action=name>Back</a>]</center>"; }elseif(($first >= 48 && $first <= 57) || ($first >= 65 && $first <= 90) || ($first >= 97 && $first <= 122) || ($first = 126)){ $change = eregi_replace(".com","...",$change); $change = eregi_replace("www.",".",$change); $change = eregi_replace(".tk",".",$change); $change = eregi_replace(".net","...",$change); $usercheck = mysql_query("SELECT * FROM users WHERE username like '$change'"); if(@mysql_num_rows($usercheck) > 0){ echo "Username already taken"; echo "<br><br><center>[<a href=cont.php?action=name>Back</a>]</center>"; /* }else{ $checkip = mysql_query("SELECT * FROM users WHERE ip = '$info[ip]'"); if((@mysql_num_rows($checkip) > 1) && ($info[status] == "Member")){ echo "Cannot change username while two users are on the same IP"; echo "<br><br><center>[<a href=cont.php>Back</a>]</center>"; */ }else{ $change = htmlspecialchars($change); $change = eregi_replace("admin","loser",$change); $change = eregi_replace("manager","loser",$change); $change = eregi_replace(".com","...",$change); $change = eregi_replace(".net","...",$change); $change = eregi_replace(" "," ",$change); $change = eregi_replace("adm1n","loser",$change); echo "Name successfully changed from $info[username] to $change"; mysql_query("UPDATE users SET username = '$change' WHERE id = '$info[id]'"); echo "<br><br>[<a href=account.php>Back</a>]</center>"; // } } }else{ echo "Username MUST start with a letter or number."; echo "<br>*$change*<br>"; echo "<br>*$first*<br>"; echo "<br><br><center>[<a href=cont.php?action=name>Back</a>]</center>"; } } }
  23. guess ill have to use the form i dont like them though lol.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.