zenag
-
Posts
443 -
Joined
-
Last visited
Posts posted by zenag
-
-
have u changed $row1 in every while statement???
like this..
while($row1=mysql_fetch_row($result))
{
while ($row1=mysql_fetch_row($result2)){
if so ...change it...to different variable...$row,$row1
-
it seems that if username & password entered is corredt it displays the same message ..
""The username or password you entered was incorrect
Please try again""
-
can u able to redirect it to rms.php if username & password entered is correct?????
-
regarding $sql1 we can assign it.variable can be of any type...nothing problem in that...
and...below query is correct it works fine
and regardng.. while ($row1=mysql_fetch_row($result2))( $uuid=$row1[0]; echo $uuid; } $result3 = mysql_query("SELECT users.firstname,users.surname,incidents.owner_id FROM incidents,users where (incidents.owner_id = users.id) OR (incidents.owner_id <'$uuid') OR (incidents.owner_id = NULL)",$link);
-
this will redirect you to rmslogin.php if they typed incorrect username or password
<?php $username=$_POST['loginname']; $userpassword=$_POST['loginpassword']; $sql="SELECT * FROM user WHERE username='$username' and password='$userpassword'"; $result=mysql_query($sql); if (mysql_num_rows($result)==0) { $_SESSION['invalid']='invalid'; header("Location:rmslogin.php"); } // Mysql_num_row is counting table row if(mysql_num_rows($result)>1) // If result matched $myusername and $mypassword, table row must be 1 row { // Register $myusername, $mypassword and redirect to file "rms.php" $_SESSION['username']=$username; $_SESSION['userpassword']=$userpassword; header("location:rms.php"); } ?>
-
$row =mysql_query("SELECT * FROM tablename ORDER BY rand()");
-
with pleasure
-
why cant u use base64_encode & base64_decode instead of sha1.....i ve checked ur code with that it works fine..... if(($username == $row["USERNAME"]) && ($secured_password == $row["PASSWORD"]))
-
<?php $ageTime = mktime(0, 0, 0, 9, 9, 1919); $t = time(); $age = ($ageTime < 0) ? ( $t + ($ageTime * -1) ) : $t - $ageTime; $year = 60 * 60 * 24 * 365; $ageYears = $age / $year; echo 'You are ' . floor($ageYears) . ' years old.'; ?>
-
am iin tamilnadu ,coimbatore.
-
& whats urs..
-
whats the error ur getting....
-
u can call me after 3 hours ...ie after 6.30 since i cant attend the call during office timings...
-
yeah im referring that...
my contact num is 9791901874.
-
i m not clear about that....but we have to integrate it from geotargeting
-
like this?????????????? <? session_start(); $clicked=$_POST["gender"]; ?><? if($clicked=="open") { ?> <html> <title> Welcome to Project Management Tool</title> <body bgcolor=#AFC7C7> <h1> Report</h1> <?php $myusername = $_SESSION['myusername']; echo $myusername; //put the above right at the top of your script. Everything else can follow ?> <? //header("Content-Type: text/plain"); /* set's the variables for MySQL connection */ $server = "localhost"; // this is the server address and port $username = "root"; // change this to your username $password = ""; // change this to your password /* Connects to the MySQL server */ $link = @mysql_connect ($server, $username, $password) or die (mysql_error()); /* Defines the Active Database for the Connection */ if (!@mysql_select_db("test", $link)) { echo "<p>There has been an error. This is the error message:</p>"; echo "<p><strong>" . mysql_error() . "</strong></p>"; echo "Please Contact Your Systems Administrator with the details"; } $sql1 = mysql_query("SELECT id from users where loginname ='".$myusername."'",$link); while($row=mysql_fetch_row($sql1 )) { #echo $result[0]; $uid=$row[0]; echo $uid; #$uid=$result["id"]; #echo "$uid"; } #$result2 = mysql_query("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) AND (incidents.contact_id = '".$result[0]."')", $link); $result2 = mysql_query("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users where (incidents.owner_id = users.id) OR (incidents.owner_id= NULL) AND (incidents.contact_id = '".$result[0]."')", $link); #echo ("SELECT incidents.id, incidents.description, users.firstname, users.surname, users.loginname FROM incidents,users WHERE (incidents.owner_id = users.id) OR (incidents.contact_id = '".$uid."')"; echo $result2 ; #$result2 = mysql_query("SELECT incidents.id,incidents.description,users.firstname,users.surname,users.loginname from incidents,users where (incidents.owner_id = users.id) OR (incidents.contact_id = '".$uid."')", $link); if (!$result2) { echo("<p>Error performing query: " . mysql_error() . "</p>"); exit(); } /* Starts the table and creates headings */ ?> <table border="1"> <tr> <td><strong>ID</strong></td> <td><strong>Description</strong></td> <td><strong>Owner Name</strong></td> <td><strong>Notes</strong></td> </tr> <td><strong>Description</strong></td> <td><strong>Owner Name</strong></td> <td><strong>Notes</strong></td></tr> <? /* Retrieves the rows from the query result set and puts them into a HTML table row */ /* Retrieves the rows from the query result set and puts them into a HTML table row */ #echo "hello"; #echo "$myusername"; while ($row = mysql_fetch_array($result2, MYSQL_ASSOC)) { echo "\n"; echo("<tr>\n<td>" . $row["id"] . "</td>"); echo("<td>" . $row["description"] . "</td>"); echo("<td>" . $row["firstname"] . $row["surname"]. "</td>"); echo("<td>" . $row["loginname"] . "</td></tr>"); # echo("<td>" . $row["name"] . "</td>"); # echo("<td>" . $row["create_time"] . "</td>"); } /* Closes the table */ ?> </table> <? /* Closes Connection to the MySQL server */ mysql_close ($link); } else { if($clicked=="closed") { echo "closed"; } } ?>
-
-
hai....just now came from lunch....sorry cant get u...what did the buttons actually need to do...
-
yeah ...ive been here just now only....i wl rectify it...
-
just unset session..... if ($_SESSION['invalid']=='invalid') { Print ' <h2>The username or password you entered was incorrect Please try again </h2>';unset($_SESSION['invalid']); } ?>
-
yeah...i can see config options at the left end...
-
now ....im able to logged in ..since ..password is password in encrypted ...i ve removed that...
-
actually ....in which page do u need to change timings..i cant open page otherthan index.php
-
yeah ...its only functions......
HELP - Can't seem to understand my old code - it works, but I dont know why.
in PHP Coding Help
Posted
rmsverifylogin.php first checks for $_POST["username]; but u have not assigned it in login page...just change it to $_POST["loginname]; ...so that it gets redirected to login page .