Jump to content

Carl-Cox-

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Carl-Cox-'s Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. grr this is annoying me i cant fink its late why wont it delete all from the database [php:1:885a98dab3] $result = mysql_query(\"SELECT * FROM xdcc\", mysql_connect(\"localhost\",\"***\",\"***\")); $countDB = mysql_num_rows($result); echo $countDB.\" Rows <BR>\"; $tempno = \"1\"; while ($tempno <= $countDB){ $query = \"DELETE * FROM xdcc WHERE id = \'$tempno\'\"; $result = mysql_query($query); $tempno++; } [/php:1:885a98dab3] its counts teh rows and add to $tempno each time but the query isnt working
  2. ok i got this code so far i thought it was right but i keep getting the error cant do it. but the line seems ok. all the tables and rows are correct im baffled. $mode = $HTTP_GET_VARS[\'mode\']; if ($mode == "login"){ $username = $HTTP_POST_VARS[\'username\']; $password = $HTTP_POST_VARS[\'password\']; $db=mysql_connect("localhost","","") or die ("cant connect"); mysql_select_db("News",$db) or die ("cant change"); $result=mysql_query("select * from users where name=\'$username\'",$db) or die ("cant do it"); while ($row=mysql_fetch_array($result)) { if ($row["password"]==$password) { print("Successfully Logged In!<a href="default.php?"\'>Click Here</a>"); exit; } } }
×
×
  • 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.