Jump to content

shdwfrk

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Everything posted by shdwfrk

  1. Alright that has me quite lost now. So far I've got this for index.php <?php require_once('includes/config.php'); ?> And then I'm lost about the whole config part. The $configpath and $basepath you mentioned go inside config.php? And what am I using these for?
  2. I was a little worried when I first saw the code you wrote gizmola, but I was just reading about Arrays and, although I have read that page before, the code does make quite a bit more sense now. As I said earlier, I was more familiar with a different approach so I am currently a little lost to what the next step would be?
  3. Ok lets take small steps here as this is where I'm going to ask a lot of questions. In most of the things I've read I'm used to seeing the whole config take place in a different way. Although, I can see what is happening, I like to kind of translate it back to english so I understand it. So let me try to get my head around this gizmola.. You have created a variable $config and put it into an array which holds all the database info, right? So that when we get around to connecting to the database we'll be using the $config variable, correct? I hope I don't frustrate you all with my noobishness
  4. I hadn't actually thought of that gizmola, but it sounds like a good idea to me. Lets see if this structure is correct. index.php pages/login.php pages/register.php and so on.. config/config.php Within config.php we would set up the database details.
  5. Ok so it's all good then. I suppose the next step would be to start on a registration page? In many of the tutorials I've read the basic first step is to check if a user is already logged in, so that a logged in user can't register again. If so, redirect them back to the homepage or elsewhere... If I'm already ahead of myself let me know lol I'm going to ask for a lot of help with the php from here... But as I said in the OP.. I don't want you guys to write everything. Give me some direction or a small piece of code and I'll look into whatever you post, ask questions, write something and see what the results are.
  6. Awesome gizmola. Very helpful. Just a question about the status and activated keys.. There wouldn't be any problem setting an unactivated account (unconfirmed) with a status of active would there? If not I'm happy with the table as it is. (If it's all correct.) CREATE TABLE users ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(18) default NULL, `password` char(32) default NULL, `email` varchar(255) default NULL, `activated` tinyint default 0, `activationkey` char(32) default NULL, `status` tinyint default 1, `salt` varchar(16) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1;
  7. @gizmola - I know what md5 and sha1 do in a sense.. but I'm not sure how to get the data I need here. I know they change a password from 'apple' to 'blahblahblah' etc. but how would I find out any 6-12 char password? I changed the sql to what Drummin has with 32 - is that correct? Also, username set to max size of 18 chars and added salt. I also want to add if the user is activated or not.. and obvioulsy it would be set to not by default.. (correct it if it's wrong please ) CREATE TABLE users ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(18) default NULL, `password` char(32) default NULL, `email` varchar(255) default NULL, `active` int(1) default '0', `salt` varchar(16) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1;
  8. I am not totally sure on how to make a database with a php script but I have phpMyAdmin to manage my database with. And just for the purpose of this, I'm only going to use username, password and email. I don't need to add anything else just yet. So to create the table in phpMyAdmin... something like this. CREATE TABLE users ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) default NULL, `password` varchar(255) default NULL, `email` varchar(255) default NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=1; @Drummin - would you care to explain why you have CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, at the password field in your code? What would be benefits or is it just personal preference?
  9. Umm.. I want to store the user data in MySQL and as far as permissions.. do you mean having 2 different types of user levels? Like a standard user and an Admin user? If so then no.. I just want to have all users as standard users, and afterwards make a system just for myself to manage the users. The management system I will do afterwards.. I just want a completely basic user login system to start with. I'll give you a little more info on what I'm looking to do... Basic register page. Username, password, confirm password and an email address. Account Activation Login problems - reset password via username or email lookup form And a standard login page. Thats the basic user system I want. Nothing fancy at this stage.
  10. I'm going to go for broke here as this is the last thing I can think of that is going to help me learn anything... First things first. I have been reading tutorials and guides and all other things about PHP and playing around with all the codes from these tutorials and guides on my localhost. All work well. Yet, they haven't really taught me a great deal since all the code is already written and it's extremely hard to customize with the limited knowledge I currently have. I do not learn very well from sitting down and reading something that someone else has already written and then trying to work out what all the parts are. When I look at some code - I can usually figure out what is happening and what the code is doing. But it doesn't really help me understand how to write the code myself... So I thought if I made a topic where I get people to help ME write out a complete code.. I would actually learn something as I go along.. asking questions where I need to and building it exactly the way I want it. Note the 'ME' is capitalized. I don't expect everyone else to write it all down for me. I want to write it - have you guys give it the ok and we'll move on to the next bit. I know there will be parts where I am completely lost and I will need people to write down something to keep the whole thing moving. I would then ask questions untill I understood what you have provided. The whole idea of this is to build a User Login/Management system. If anyone is up for supporting this idea and helping me start from scratch let me know. Otherwise I'm not sure what else I'm going to have to do.
  11. Welcome phpchick. I'm a newbie here also
  12. Can anyone suggest some real decent tutorials or guides to learn from? Nothing I've found so far has been helpful. A tutorial which is some code + 2 lines of description doesn't help at all.
  13. Hello Everyone. My name is James, I'm 28 and I'm from Australia. I've been wanting to learn PHP for quite a while and have been looking at basic Login system tutorials for a few months now. I have been having a few problems with them however, which I will leave for another post. I have Apache and PHP5 running on my computer so I can learn/test PHP/MySQL and anything else web related. I enjoy web design and all manner of computing and decided that since I learnt HTML back when I first started using the internet a few years ago it was about time I upgraded to PHP. I look forward to meeting you all and hope you can all help me progress further with my (very limited) PHP knowledge.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.