Christian Brown
Member
- Sep 10, 2011
- 135
- 9
database structure link is not working
$username = $_POST['username'];
$password = $_POST['password'];
if(isset($_POST['submit']))
{
if(isset($_POST['submit'])) {
$username = mysql_real_escape_string($_POST['username']);
$password = $_POST['password'];
Im sure you can create the database from viewing the files, its not too hard. And by the looks of it theres only 1 table that need creatingdatabase structure link is not working
It's not even that hard...database structure link is not working
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(80) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(80) NOT NULL,
`fullname` varchar(60) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ;
You must be registered for see linkscompress in one file than upload will be much help for me.
Thank youHere you go:
You must be registered for see links
htmlentities()
echo htmlentities($_SESSION['user']);
A $_SESSION hasn't anything to do with SQL...You should really use:
When getting things from database base:PHP:htmlentities()
Because if you don't you will get people trying to SQL inject, they could create a username: Hi<script>alert('Hi');</script>PHP:echo htmlentities($_SESSION['user']);
If you don't htmlentities() then you would get javascript alerts.
I know, look through me.php code:A $_SESSION hasn't anything to do with SQL...
echo "<a href='me.php'>".$_SESSION['user'] ."</a> |";
Yes... the username in the SESSION. If I make this code:I know, look through me.php code:
echos username....PHP:echo "<a href='me.php'>".$_SESSION['user'] ."</a> |";
$_SESSION['user'] = 'Holmes'
Yes... the username in the SESSION. If I make this code:
the code you gave would have echod Holmes. So your argument is quite invalid, sir.PHP:$_SESSION['user'] = 'Holmes'
Well, actually thats where strip_tags and mysql_real_escape_string come in. So please don't start to judge a code if you don't have your facts straight.Yes but i'm saying if your username wasn't Holmes and was Homes<script> then that's where htmlentities() come in!
Anyonw with the database sharefast.net does not work
database structure link is not working
nothing is working guys.... and changing the login/index page to that just gives me the errors
Notice: Undefined index: username in C:\xampp\htdocs\login.php on line 6
Notice: Undefined index: password in C:\xampp\htdocs\login.php on line 7
Notice: Undefined index: user in C:\xampp\htdocs\login.php on line 50