Jump to content

clown[NOR]

Members
  • Posts

    708
  • Joined

  • Last visited

    Never

About clown[NOR]

  • Birthday 01/09/1984

Profile Information

  • Gender
    Male
  • Location
    Trondheim, Norway

clown[NOR]'s Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Poll & Members returns a white page with "EPIC FAIL" that's not good.. Screenshots took torever to load also there's no image. it would be good if you also provided a demo user so people can have a look at the control panel
  2. $query = "SELECT * FROM friends WHERE username='$sessid' AND friendname='$friendid'"; $result = mysql_query($query) or die(mysql_query()); $num_results = mysql_num_rows($result); if ($num_results > 0){ $row = mysql_fetch_array($result); $isfriend = 'y'; } else { $isfriend = 'n'; } you were trying to run mysql_query() on $result which allready contained the result of a string processed by mysql_query()[/code]
  3. you can use an if statement inside the <input> and check those that needs to be.. something like this <input type="checkbox" name="region[]" value="2" <?php if (this should be checked) { echo "checked"; } ?> />
  4. no problem =) glad i could help... could you please post line 135 and also a few lines above? it's hard to sit and count all the lines to see if we find the right one
  5. my friend just sent me this on msn... Uniques: Pageviews: Hits: Transfer: Today 1 686755 686755 13.76 GB Friday 57 585191 585191 11.69 GB Thursday 54 94894 94894 1.88 GB Wednesday 54 60210 60210 1.20 GB Tuesday 83 557118 557118 11.09 GB Monday 89 511988 511988 10.19 GB Sunday 80 1188744 1188744 23.66 GB Saturday 66 246957 246957 4.91 GB Total: 484 3931857 3931857 78.37 GB to me this looks very wrong
  6. have you also troubleshooted the $_SESSIONs? just trying to echoing out the value of them and see if it's printing out the expected result?
  7. firstof all this looks weird to me ini_set(’memory_limit’,'32M’); think it should be something like this.. ini_set(’memory_limit’,'32M'); not sure, but it might fix it?
  8. try maybe changing from if(!isset($_COOKIE['loggedin']) && $_COOKIE['loggedin'] == md5("TRUE")) to if(!isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == md5("TRUE"))
  9. thanks for the answer... i've notified my friend about it.. we'll see what happens
  10. we have no idea even what's causing this... so i just wondered if it's actually possible...
  11. is there a way to program some sort of bot that keeps sending fake visitors to a website? if so.. is there a way to be able to block this? a friend of me is now suddenly getting over 100.000 hit's per day and his host is getting pissed cuz he's using way more bandwidth than he's payed for. Thanks in advance - Clown
  12. you dont need to link to another page.. you can do everything inside the same file..
  13. well you mean like button or link? if you make a link you can make it something like this <?php $sortby=$_GET['sortby']; $sort=$_GET['sort']; if (!$sortby) { $sortby="name"; } if (!$sort) { $sort="desc"; } if ($sort=="asc") { $ascdesc = "desc"; } elseif ($sort=="desc") { $ascdesc = "asc"; } echo '<a href="filename.php?sortby=name&sort='.$ascdesc.'"><br />"; $result=mysql_query("SELECT * FROM `table` SORT BY $sortby $sort"); // ... Follow up with the rest of the code here ... ?> hope this guides u a little further
  14. you can try adding like a &sortby=name&sort=desc/asc then $sortby=$_GET['sortby']; $sort=$_GET['sort']; mysql_query("SELECT * FROM `table` SORT BY $sortby $sort"); think that should work
  15. well basicly what i'm doing is that i'm working on the Edit Profile page.. but when the user clicks "Save Changes" something weird happens.. no matter what the user types in the password field, the field sais "0"... this is the script i'm working with... <?php session_start(); print_r($_SESSION); require_once( 'includes/functions.php' ); $chkLogin=chkLogin(); if ($_POST['Submit']) { if ($chkLogin==TRUE) { // Do NOT add any changes if user is not logged in. con2db(); $oldPass=mysql_real_escape_string($_POST['oldpass']); $newPass=mysql_real_escape_string($_POST['newpass']); $vnewPass=mysql_real_escape_string($_POST['vnewpass']); $fname=mysql_real_escape_string($_POST['fname']); $lname=mysql_real_escape_string($_POST['lname']); $email=mysql_real_escape_string($_POST['email']); $city=mysql_real_escape_string($_POST['city']); $coutnry=mysql_real_escape_string($_POST['country']); $id=mysql_real_escape_string($_POST['id']); if (!$oldPass) { /*$dbq="UPDATE `users` SET `fname`='$fname' AND `lname`='$lname' AND `email`='$email' AND `city`='$city' AND `country`='$country' WHERE `id`='$id' LIMIT 1 ";*/ echo "Do NOT change password"; } elseif ($oldPass) { // Check if old pass is correct $pass=md5($oldPass); //echo "Pass #1: $pass<br>"; $xtrasec=md5($pass); //echo "Pass #2: $xtrasec<br>"; $pass=$xtrasec.$pass; //echo "Pass #3: $pass<br>"; $pass=md5($pass); //echo "Pass #4: $pass<br>"; $chkOldPass="SELECT * FROM `users` WHERE `pass`='$pass' AND `id`='$id' LIMIT 1"; $copRes=mysql_query($chkOldPass); if ($copRes) { $num=mysql_num_rows($copRes); if ($num==1) { // Old password matches the password stored in the database echo "Test"; // Check for errors in new password if (!$newPass) { $errors[].="You did not enter a news password."; } if (!$vnewPass) { $errors[].="You did not verify your password."; } if ($newPass!=$vnewPass) { $errors[].="The passwords didn't match."; } if ($errors) { // Found errors $_SESSION['errors']=$errors; } else { $pass=md5($newPass); $xtrasec=md5($pass); $pass=$xtrasec.$pass; $pass=md5($pass); $dbq="UPDATE `users` SET `pass`='$pass' AND `fname`='$fname' AND `lname`='$lname' AND `email`='$email' AND `city`='$city' AND `country`='$country' WHERE `id`='$id' LIMIT 1 "; mysql_query($dbq); } } else { echo "Old pass WRONG!"; } } else { echo "Something went wrong!"; } } } } ?> when i try using "echo $pass" it returns the right value... so this must be something i'm doing wrong with the UPDATE query still pretty new to mysql
×
×
  • 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.