itsmeArry
Members-
Posts
161 -
Joined
-
Last visited
Never
Everything posted by itsmeArry
-
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());
-
here is the problem instead of this $birthday = $day-$month-$year; use this $birthday = $day."-".$month."-".$year;
-
try using this echo '<tr> <td width="110" bgcolor="'.$row_color.'" nowrap> '.$Location.'</td> <td bgcolor="'.$row_color.'"> <a>'.$Industry.'[/url]</td> </tr>';
-
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>
-
why can't u use javascript...
-
for what query you are using this while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) and post the complete code...
-
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.....
-
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";
-
Authentication and an event and if statment to stop execution.
itsmeArry replied to todayme's topic in PHP Coding Help
its better late than never........ -
Elseif statements - am i using the right one
itsmeArry replied to Richzilla's topic in PHP Coding Help
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... -
Authentication and an event and if statment to stop execution.
itsmeArry replied to todayme's topic in PHP Coding Help
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(); } -
try print_r($file); and post here what you get
-
Authentication and an event and if statment to stop execution.
itsmeArry replied to todayme's topic in PHP Coding Help
post the code of test.php then I can tell where is the problem -
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
-
Authentication and an event and if statment to stop execution.
itsmeArry replied to todayme's topic in PHP Coding Help
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.... } -
you are missing a ; include("downloadfile.php") use this include("downloadfile.php");
-
try changing $path = "./uploads"; to $path = "uploads";
-
Authentication and an event and if statment to stop execution.
itsmeArry replied to todayme's topic in PHP Coding Help
ooops sorry my mistake it should be mysql_num_rows($data) and not mysql_num_rows($result) -
Authentication and an event and if statment to stop execution.
itsmeArry replied to todayme's topic in PHP Coding Help
$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(); -
if(isset($_POST['username']) && $_POST['username'] == '') echo "\n Invalid User Name"; this will do
-
How do I Auto insert to db without a form
itsmeArry replied to Parabolundertow's topic in PHP Coding Help
you are missing a ' here if($_GET['do']=='update use if($_GET['do']=='update' -
try print_r($icon); and c whats coming in that
-
"Out of range value adjusted for column 'id' at row 1"
itsmeArry replied to Lambert's topic in PHP Coding Help
and also do post the database structure...