No Errors in a login page
Posted by: kevinkevin (---.alshamil.net.ae)
Date: February 10, 2014 03:20PM

Hello All!

I am quite new and I haven't done php programming yet, however, I have friends helping me in this.

We're stuck at a problem where we made a login page through dreamweaver and set up a database on the localhost thing. Everything seems to be fine, We sorted out the errors found intially, however now we still can't logon to the next page (I made the credentials already user and password both 'admin' for now).

This time there are no errors whatsoever, nothing happens. The page just reloads. Any thoughts?

Options: ReplyQuote
Re: No Errors in a login page
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 10, 2014 03:35PM

Yea,

but you are going to have to show some code or it will just be guess work

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: No Errors in a login page
Posted by: kevinkevin (---.alshamil.net.ae)
Date: February 10, 2014 04:19PM

Okay here it is. Quite short i believe.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[www.w3.org];
<html xmlns="[www.w3.org];
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
background-color: #FFFFFF;
}
#form1 p {
font-family: Verdana, Geneva, sans-serif;
font-size: 24px;
color: #FFFFFF;
}
</style>
</head>

<body bgcolor="#303030">
<table width="100%" border="0">
<tr>
<td colspan="2"><p><center><img src="index_01.gif" width="1600" height="163" /></center></p></td>
</tr>
<tr>
<td bgcolor="#303030"><center><form id="form1" name="form1" method="form1" action="">
<p>&nbsp;</p>
<p>
<label for="UName">Username:</label>
<input type="text" name="UName" id="UName" />
</p>
<p>
<label for="PWord">Password:</label>
<input type="password" name="PWord" id="PWord" />
</p>
<p>
<input type="submit" name="Submit" id="Submit" value="Submit" />
</p>
<p>&nbsp;</p>



</form>

</center></td>
<td width="50%" bgcolor="#CCCCCC"><strong><center>Announcements</center></strong></td>
</tr>
</table>
<?php

@$txtUser=$_POST['UName'];
@$Passwd=$_POST['PWord'];
@$submit=$_POST['Submit'];


$dbhost = "localhost";
$dbuser = "root";
$dbpass = "";
$dbname = "safedrive";




mysql_connect($dbhost, $dbuser, $dbpass) or die("MySQL Error: " . mysql_error());
mysql_select_db($dbname) or die("MySQL Error: " . mysql_error());


$findUName = mysql_query("SELECT * FROM users WHERE UName = '".$txtUser."'"winking smiley
or die(mysql_error());

if ($submit = 1)
{
echo ("Testing"winking smiley;
if(mysql_num_rows($findUName) == 1)
{
$checkPassword = mysql_query("SELECT * FROM users WHERE PWord = '".$Passwd."'"winking smiley
or die(mysql_error());

if(mysql_num_rows($checkPassword) == 1)
{
echo '<br>fuck the world';
echo '<p><a href="[localhost] ME</a></p>';
}
else
{
echo ("<br>Username/Password Incorrect"winking smiley;
}
}
else
{
return "SQL-NOT-OK-ACCT";
}
}
?>
</body>
</html>

Options: ReplyQuote
Re: No Errors in a login page
Posted by: RiggsFolly (---.ppp.as43234.net)
Date: February 10, 2014 04:41PM

Ok so neither of you know what you are doing.


Tutorial [www.html-form-guide.com]

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote


Sorry, only registered users may post in this forum.