Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

GTG Project?


  • Please log in to reply

#46
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I am going to use the session variables
$_SESSION['nick']
$_SESSION['password'] 
to keep the user logged in, so you could do this to find out everything else about the user


$nick = $_SESSION['nick']
$password = $_SESSION['password'] 

$result = mysql_query("SELECT nick,First,Last,email,approve,id FROM $table WHERE nick='$nick' AND password='$password' ");
while($row = mysql_fetch_array($result)) {
$id = $row['id'];
$First = $row['First'];
$Last = $row['Last'];
$email = $row['email'];
$approve = $row['approve'];
}

I upload all the code soon, just a few touch ups in the login script, I got registering, and them approval put down and finished. It is all pretty raw output, there is no head element or anything like that.

Edited by Michael, 10 January 2007 - 04:14 PM.

  • 0

Advertisements


#47
ScHwErV

ScHwErV

    Member 5k

  • Topic Starter
  • Retired Staff
  • 21,285 posts
  • MVP
Did you do a config file? I did but its not like it was really difficult.

Now that I have the session variables I should be able to post the add.php tomorrow (although with what you have already done, all it will be from me is a textarea form, submit button, and sql input line :whistling:
  • 0

#48
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
9418 key strokes later we have out login script! More really, rewrote bits more than once.

It contains

Login_1.php and Login_2.php the main login scripts.
settings.php all the mysql and other settings.
install.php for making the tables.
functions.php it only got one function in it, for running all user input through, you should use this ScHwErV
logout.php for logging out, so you can log granny out and the do your Christmas list
register.php for new users to sign up.
approve.php for approving new users - password protected this script.
recover.php why I did not post this an hour ago, sends out the user name and password to an e-mail address.

test.php this is an example of the script in action. You will notice if you look that there is a setting called $access_level = 1; this adds some flexibility to the script. 0 mean that any registered user can view the page. You could set this for say the list of presents. And then set 1 for adding to the list, so only approved members can do that. 3 mean only the list admin can access the page, I set that for the approve page. I left 2 free, so we can maybe use that for mod/staff if we chose to do so.

Attached Files

  • Attached File  xmas.zip   5.38KB   196 downloads

  • 0

#49
ScHwErV

ScHwErV

    Member 5k

  • Topic Starter
  • Retired Staff
  • 21,285 posts
  • MVP
Holy crap!

Ive gotta dig out my php book to make sure Im using this properly, Ive not done password protecting and sessions before.
  • 0

#50
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
Are we still working on this ?

:whistling:
  • 0

#51
ScHwErV

ScHwErV

    Member 5k

  • Topic Starter
  • Retired Staff
  • 21,285 posts
  • MVP
I am, sorry, things have been very hectic lately. At work I am in the middle of bid specs and RFPs for furniture and equipment for summer projects. One of my side clients decided to dump all their equipment and buy all new, so my evenings and weekends have been more hectic than I am familiar with.

And my wife and kid are currently sick :whistling:

I set up your password system on a test domain and it works fantastic. I started to disassemble it and look at what you posted about the session information, I just haven't had time to put it all together.

As I said before, I have to look up some of the things that you did as I haven't used them before. Some of the things I have, but haven't in so long that Ill need a refresher on what they do.

I know I am holding the project up. I could probably just ask you to do the add and view pages and you would have it done in a few minutes, I just wanted to be able to do something. Now I am holding up progress and thats not fair.

If you have time, are you interested in doing the add/view pages? If not, thats completely fair, you have done a lot of the work and I can do it, it'll just take me time.

Let me know what you want to do and we can go with that.
  • 0

#52
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I been very busy too, I started school again two weeks ago. And that takes up most of my time. I just thought it was time to give this topic another nudge.

I might do it, but I post before I start just in case you beat me too it.
  • 0

#53
ScHwErV

ScHwErV

    Member 5k

  • Topic Starter
  • Retired Staff
  • 21,285 posts
  • MVP
Now it seems that we are all busy, so how to go about getting this project finished? Should I post in the web design forum for a php/mysql coder and see if we can get someone interested in helping us finish this?
  • 0

#54
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I will do it over the Easter holidays, I will not have too much school to do then.

We just need the pages for adding any removing items from the list right?

Edited by Michael, 22 March 2007 - 08:51 PM.

  • 0

#55
thenotch

thenotch

    Member

  • Retired Staff
  • 668 posts
I am in the process of buying a home and don't have a lot of time right now, but as soon as we settle in I will take another look at this project...
  • 0

Advertisements


#56
ScHwErV

ScHwErV

    Member 5k

  • Topic Starter
  • Retired Staff
  • 21,285 posts
  • MVP
To get everything functioning, all we need is the input/output script. You already did the login/account script. Once we have the input/output portion, well have enough functionality to have a working product so we only have to work on tweaks.
  • 0

#57
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I have since completely rewrote that login script for use on my site. I will include the updates and the input/ouput stuff when I hand the code over. If it only that I might try it to night or something.
  • 0

#58
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I stayed up till past midnight, it is almost 1am (well doing this amongst other things). It is almost done http://codefisher.org/christmass/

I took what I could of thenotch's theme, and add a bit of my own. I installed my login script, and started the other stuff. End of next week and it should be finished, earlier if I find some time.

Michael
  • 0

#59
ScHwErV

ScHwErV

    Member 5k

  • Topic Starter
  • Retired Staff
  • 21,285 posts
  • MVP
Looks to be really coming along man. I cant wait to see the code to see how you made it all come together.

No worries about the skin, we can fix that up when you get the code done. I'm sure thenotch still has everything he needs to complete it.
  • 0

#60
Michael

Michael

    Retired Staff

  • Retired Staff
  • 1,869 posts
I have been very busy doing various things over Easter. But I fixed up the post/edit list if you want to sign up you can give it a try. Just need to sort out the view lists and a few other mirror things.

Does any one want FTP access to it?
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP