Jump to content

SkullMaster

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

SkullMaster's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i would always put in an id field, just to make things easier
  2. i didnt set a path, just a name and a value, so it defaulted to '/' and still doesnt work :(
  3. I'm working on an upload site using cookies to track users but my cookies only seem to work when "www." is in the url. like...http://www.thekch.com works with the cookie and [a href=\"http://thekch.com\" target=\"_blank\"]http://thekch.com[/a] doesnt. There has to be an easy fix. Thanks in advance, KC
  4. [!--quoteo(post=375940:date=May 21 2006, 09:09 PM:name=jokeascool)--][div class=\'quotetop\']QUOTE(jokeascool @ May 21 2006, 09:09 PM) [snapback]375940[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hello All, I am having a problem with a bit of code. I believe my logic is off somewhere and a fresh pair of eyes may help. I know that I can access the db and get the information. The problem is if I enter incorrect password or username it still sends me to the welcome page. Where as if the login info is wrong I want to go to index2 to have them try again. No matter what I enter it takes me to the welcome page. Could you please tell me what I am doing wrong. [code] <?php session_start(); unset($uname); unset($pword);     $host="localhost:3306"; $user="username"; $lipassword="password"; $database="bfcc"; $uname=$_POST['fusername']; $pword=$_POST['password']; $connection=mysql_connect($host,$user,$lipassword)             or die ("Problems Connecting to Server");              $db=mysql_select_db($database,$connection)             or die ("Could not create connection with the database");              $query="SELECT * FROM users WHERE username = '$uname' AND password = '$pword'"; $result=mysql_query($query,$connection)             or die("Could not execute query"); if (!mysql_num_rows($result)) {   header("Location: index2.php"); } header("Location: welcome.php");              mysql_close($connection); ?> [/code] Thanks Joe [/quote] my suggestion would be to change if (!mysql_num_rows($result)) { to if (mysql_num_rows($result) > 0) { what you have now is probably returning a value of 0 instead of null like you want, making it pass through everyime.(i could be wrong, just trying to help)
  5. SkullMaster

    Address Icon

    the icon must be named favicon.ico or you could link to the icon file like... <LINK REL="SHORTCUT ICON" HREF="favicon.ico">
  6. i got it working. i queried for a row with the id then checked the number of rows returned. 0=doesnt exist and 1=exists :)
  7. My site looks fine in FireFox but when i open it with IE all of my tables are off by a little bit and nothing seems to fit. www.thekch.com is the url and i could really use the help. Thanks :)
  8. Can anyone tell me if there is a mysql command to search for a row number in a mysql table? im working on a file upload site and displaying the file info. I recently added the admin's delete feature that deletes the row from the mysql table, and now i have missing rows and get errors when i try to display the file info. Warning: mysql_result(): Unable to jump to row 19 on MySQL result index 24 in /home/skullmas/public_html/working/admin2.php on line 99 i was just looking for something that would let me see if row 19(for example) was in the table before it tried to get the data that doesnt exist from it. Thanks
×
×
  • 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.