Jump to content

itsmeArry

Members
  • Posts

    161
  • Joined

  • Last visited

    Never

Everything posted by itsmeArry

  1. you are missing a ; here $Result1 = mysql_query($insertSQL, $elvisdb) or die(mysql_error()) use this $Result1 = mysql_query($insertSQL, $elvisdb) or die(mysql_error());
  2. here is the problem instead of this $birthday = $day-$month-$year; use this $birthday = $day."-".$month."-".$year;
  3. try using this echo '<tr> <td width="110" bgcolor="'.$row_color.'" nowrap> '.$Location.'</td> <td bgcolor="'.$row_color.'"> <a>'.$Industry.'[/url]</td> </tr>';
  4. try this out <html> <body> <form action="" method="post"> <center> Username: <input name="username" type="text" size="10" maxlength="30"/> Password: <input name="password" type="password" size="10" maxlength="30" /> <input type="submit" value="Login" /> </form> </center> <?php $mysql_host='localhost'; $mysql_user='xyz'; $mysql_password='xyz'; $my_database='xyz'; $my_table='users'; // Connecting, selecting database $link = mysql_connect($mysql_host,$mysql_user, $mysql_password) or die('Could not connect: ' . mysql_error()); mysql_select_db($my_database) or die('Could not select database'); // Performing SQL query $query = "SELECT user FROM $my_table"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); // Printing results in HTML //echo "<table>\n"; $usertrace = ''; $numRows = mysql_num_rows($result); while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($line['user'] == $_REQUEST['username']) { $user = $line['user']; $usertrace=1; $query = "SELECT pass FROM $my_table WHERE user='$user'"; $result=mysql_query($query) or die('Query failed: ' . mysql_error()); while($row = mysql_fetch_array($result)) { if ($row['pass'] == $_REQUEST['password']) { echo "Welcome!"; } else { echo "\nInvalid Password"; } } } } if ($usertrace !== '1') { echo "\n Invalid User"; } // Free resultset mysql_free_result($result); // Closing connection mysql_close($link); ?> </body> </html>
  5. why can't u use javascript...
  6. for what query you are using this while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) and post the complete code...
  7. check the link on this page for the images.... http://www.usb-direct.net/usb-products/ its http://localhost/usb-direct//wp-content/uploads/2007/02/usb_stick_11.thumbnail.jpg localhost should not be there.....
  8. use this code... $usertrace = ''; $numRows = mysql_num_rows($result); if($numRows > 0) while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($line['user'] == $_REQUEST['username']) { $user = $line['user']; $usertrace=1; $query = "SELECT pass FROM $my_table WHERE user='$user'"; $result=mysql_query($query) or die('Query failed: ' . mysql_error()); while($row = mysql_fetch_array($result)) { if ($row['pass'] == $_REQUEST['password']) { echo "Welcome!"; } else { echo "\nInvalid Password"; } } } } else echo "\nInvalid User Name";
  9. its strange that the <p tag is not taking the css class... does the class you are applying in <p tag exists.. try give something in style property of <p style="" and check if that works have no idea why it wont work...
  10. here is the error if(mysql_num_rows($data) < 1) Print "Authentication Failed"; exit(); use this if(mysql_num_rows($data) < 1) { print "Authentication Failed"; exit(); }
  11. try print_r($file); and post here what you get
  12. post the code of test.php then I can tell where is the problem
  13. dorry I didn't read it ignore this reply..... here is the problem you missed a "/" $avar1 = "/test1.txt"; $avar2 = "/test2.txt"; echo copy($path.$avar1, $path.$avar2); this will work if you have permissions on the folder thumbs
  14. you can use if(mysql_num_rows($result) < 1) exit(); else { /// your code goes here what you want to if there is record in db.... }
  15. you are missing a ; include("downloadfile.php") use this include("downloadfile.php");
  16. try changing $path = "./uploads"; to $path = "uploads";
  17. ooops sorry my mistake it should be mysql_num_rows($data) and not mysql_num_rows($result)
  18. $data = mysql_query("SELECT * FROM _User WHERE Email = '$dbemail' AND Password = '$dbpassword'") or die(mysql_error()); $result = mysql_fetch_array($data); if(mysql_num_rows($result) < 1) exit();
  19. if(isset($_POST['username']) && $_POST['username'] == '') echo "\n Invalid User Name"; this will do
  20. you are missing a ' here if($_GET['do']=='update use if($_GET['do']=='update'
  21. try print_r($icon); and c whats coming in that
×
×
  • 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.