Page 1 of 1
download files for login tutorial Where do I find the site to download the files for Login part 8
#1
Posted 10 December 2010 - 02:24 PM
Where do I find the site to download the files for Login part 8. Ben rapidly says 'from killersites university', but i cannot find this. Help
#2
Posted 10 December 2010 - 02:39 PM
Welcome to the forum, and I hope you are finding the videos useful.
This assumes you are a member of the KillerSites university... You can download the files by going to http://killersites.com/university/, logging in, and looking at the downloads within the PHP > PHP Login section.
This assumes you are a member of the KillerSites university... You can download the files by going to http://killersites.com/university/, logging in, and looking at the downloads within the PHP > PHP Login section.
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
#3
Posted 10 December 2010 - 04:49 PM
Ben, on 10 December 2010 - 02:39 PM, said:
Welcome to the forum, and I hope you are finding the videos useful.
This assumes you are a member of the KillerSites university... You can download the files by going to http://killersites.com/university/, logging in, and looking at the downloads within the PHP > PHP Login section.
This assumes you are a member of the KillerSites university... You can download the files by going to http://killersites.com/university/, logging in, and looking at the downloads within the PHP > PHP Login section.
I purchased the CompletePHP Programmer and downloaded it yesterday. I did 1-7 and now you give instruction to download.
Are you saying I need to pay for a subscription too now??
#4
Posted 10 December 2010 - 04:54 PM
Oh, sorry. I'm not super familiar with those packages -- Stefan handles that side of things. Can you PM me your email address, and I'll send you a link to the files?
I'll have to talk to Stefan about giving a place for people who download one of the "Complete" courses to find the source files. Sorry about that!
I'll have to talk to Stefan about giving a place for people who download one of the "Complete" courses to find the source files. Sorry about that!
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
#5
Posted 10 December 2010 - 05:40 PM
Ben, on 10 December 2010 - 04:54 PM, said:
Oh, sorry. I'm not super familiar with those packages -- Stefan handles that side of things. Can you PM me your email address, and I'll send you a link to the files?
I'll have to talk to Stefan about giving a place for people who download one of the "Complete" courses to find the source files. Sorry about that!
I'll have to talk to Stefan about giving a place for people who download one of the "Complete" courses to find the source files. Sorry about that!
OK ... My Email is lgabrielse@verizon.net
Also, I am going crazy trying to find an error ... You will probably see it right away...
Do you see it on line 76 below, i.e. if ($check = $mysqli->("SELECT password FROM members WHERE id = ?"))
Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '{' or '$' in C:\Inetpub\wwwroot\phproot\LoginKiller\change_password.php on line 76
Here is the code:
<?php
/*
* REGISTER.php
* Register New members
*/
//start session / load configs
session_start();
include('includes/config.php');
include('includes/db.php');
// check that the user is loggeed in
if(!isset($_SESSION['username']))
{
header("location: login.php");
}
// check for inactivity
if (time() > $_SESSION['last_active'] + $config['session_timeout'])
{
// log out user
session_destroy();
header("Location: login.php?timeout");
}
else
{
$_SESSION['last_active'] = time();
}
//form defaults
$error['alert'] = '';
$error['current_pass'] = '';
$error['pass'] = '';
$error['pass2'] = '';
$input['current_pass'] = '';
$input['pass'] = '';
$input['pass2'] = '';
if (isset($_POST['submit']))
{
// process form
if ($_POST['current_pass'] == '' || $_POST['password'] == '' || $_POST['password2'] == '')
{
// all fields need to be filled in
if ($_POST['current_pass'] == '') {$error['current_pass'] = 'required!';}
if ($_POST['password'] == '') {$error['pass'] = 'required!';}
if ($_POST['password2'] == '') {$error['pass2'] = 'required!';}
$error['alert'] = 'Please fill in the required fields!';
$input['current_pass'] = htmlentities($_POST['current_pass'], ENT_QUOTES);
$input['pass'] = htmlentities($_POST['password'], ENT_QUOTES);
$input['pass2'] = htmlentities($_POST['password2'], ENT_QUOTES);
// show form
include('views/v_password.php');
}
elseif ($_POST['password'] != $_POST['password2'])
{
// both password fields need to match
$error['alert'] = 'Password fields must match!';
$input['current_pass'] = htmlentities($_POST['current_pass'], ENT_QUOTES);
$input['pass'] = htmlentities($_POST['password'], ENT_QUOTES);
$input['pass2'] = htmlentities($_POST['password2'], ENT_QUOTES);
//show form
include('views/v_password.php');
}
else
{
// get data from form
$input['current_pass'] = $_POST['current_pass'];
$input['pass'] = $_POST['password'];
$input['pass2'] = $_POST['password2'];
if ($check = $mysqli->("SELECT password FROM members WHERE id = ?"))
{
$check->bind_param("s", $_SESSION['id']);
$check->execute();
$check->bind_result($current_pass);
$check->fetch();
$check->close();
}
if (md5($input['current_pass'] . $config['salt']) != $current_pass)
{
// error
$error['alert'] = "Your current password is incorrect!";
$error['current_pass'] = "incorrect";
include('views/v_password.php');
}
else
{
//update database
if ($stmt = $mysqli->prepare("UPDATE members SET password = ? where ID = ?"))
$stmt->bind_param("ss", md5($input['current_pass'] . $config['salt']), $_SESSION['id']);
$stmt->execute();
$stmt->close();
$error['alert'] = 'Member added successfully!';
//clear varaibles
$input['current_pass'] = '';
$input['pass'] = '';
$input['pass2'] = '';
include('views/v_password.php');
}
else
{
echo "ERROR: Could not prepare MYSQLi statement.";
}
}
}
else
{
include('views/v_password.php');
}
// close db connection
$mysqli->close();
?>
#6
Posted 10 December 2010 - 05:43 PM
I would need to double check, but I think that this line:
$mysqli->("SELECT password FROM members WHERE id = ?")
should be:
$mysqli->query("SELECT password FROM members WHERE id = ?")
...or something similar -- I can't remember the syntax off the top of my head. Double check my video.
EDIT: Just sent you the files.
$mysqli->("SELECT password FROM members WHERE id = ?")
should be:
$mysqli->query("SELECT password FROM members WHERE id = ?")
...or something similar -- I can't remember the syntax off the top of my head. Double check my video.
EDIT: Just sent you the files.
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
#7
Posted 10 December 2010 - 06:03 PM
Ben, on 10 December 2010 - 05:43 PM, said:
I would need to double check, but I think that this line:
$mysqli->("SELECT password FROM members WHERE id = ?")
should be:
$mysqli->query("SELECT password FROM members WHERE id = ?")
...or something similar -- I can't remember the syntax off the top of my head. Double check my video.
EDIT: Just sent you the files.
$mysqli->("SELECT password FROM members WHERE id = ?")
should be:
$mysqli->query("SELECT password FROM members WHERE id = ?")
...or something similar -- I can't remember the syntax off the top of my head. Double check my video.
EDIT: Just sent you the files.
OK, Thanks
even though it is not in your video, adding the 'query' to the statement fixed it... Thank You!
Have a great weekend.. Leonard
#8
Posted 10 December 2010 - 06:09 PM
Quote
even though it is not in your video, adding the 'query' to the statement fixed it... Thank You!
Well, I'm not perfect, so it's possible I made an error in the video and you'll see me fix it a little later in the video when I tested things. I'm happy to hear that you got it fixed though.
Benjamin Falk | Falken Creative : Twitter : KillerSites Screencast Blog
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
Skills: Photoshop, Illustrator, HTML, CSS, jQuery, PHP and CodeIgniter
Share this topic:
Page 1 of 1

Help











