Help with error localhost/install.php
Posted: 22. May 2012 18:58
Sorry, I've been bad at this in the past but im getting an error when i try to go to localhost/install.php
The error is
Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:\xampp\htdocs\install.php on line 14
The error is
Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in C:\xampp\htdocs\install.php on line 14
- Code: Select all
<?php
session_start();
$host="localhost";
$username="root";
$password="holly";
$db_name="db";
$tbl_name="mysql";
$link = mysql_connect($host, $username, $password)or die("cannot connect. Please contact us");
mysql_select_db($db_name)or die("cannot select DB. Please contact us");
while($row = mysql_fetch_array('1')){
if ($queryString == $row[activationkey]){
echo "Congratulations! You have succesfully activated you account. You may now login.";
$sql=("UPDATE users SET activationkey='' AND status='activated' WHERE username=".$row['username']);
if (!mysql_query($sql))
{
die('Error: ' . mysql_error());
}
}
}
?>