Byte Forums
»
Computing
»
Programming
»
Web Programming
»
PHP
New to PHP need a little help with member scripts.
|
|
|
New to PHP need a little help with member scripts.
|
|
11-10-2008, 10:41 PM
Post: #1
|
|||
|
|||
|
Hey guys a found a tutorial on this site for membership scripts.
I felt brave so I re wrote them and added a little more validation to them the problem I have is after you have logged in and it redirects you the the index.php how do I display information held by the database for the logged in user? Sorry for the noobie question but I now very little PHP. Any help would be greatly appreciated. Thanks as always. Josh Connerty. If anyone ever needs any help with PHP, HTML, CSS, JavaScript, AJAX or MySql just ask. Also If anyone would like me to create a tutorial about anything to do with these subjects just ask. |
|||
|
11-10-2008, 10:57 PM
Post: #2
|
|||
|
|||
|
RE: New to PHP need a little help with member scripts.
Is this the tutorial you are referring to?
http://byteforums.com/thread-390.html depending on how much you have re-wrote it is going to change my answer. If you post your new code i'd be happy to read through it and answer your question the best i can PS Welcome to the forums! ![]() Web Hosting | Shoutcast Servers | Custom Solutions |
|||
|
11-11-2008, 12:29 AM
(This post was last modified: 11-11-2008 12:42 AM by Josh Connerty.)
Post: #3
|
|||
|
|||
|
RE: New to PHP need a little help with member scripts.
I'd prefer not to post the code as it is really long but, I haven't changed it as such just added validation to it and changed the errors to refer to an error document as apose to just echoing out text.
So the main code is exactly the same but when I get back to my index.php I put an if statement followed by an else statement and this says it was logged in. This code is as follows Code: <?phpI also tried: Code: <?phpI've it is vital that I post the documents than I shall. Thanks as always, Josh Connerty. P.S. Thanks buddy. If anyone ever needs any help with PHP, HTML, CSS, JavaScript, AJAX or MySql just ask. Also If anyone would like me to create a tutorial about anything to do with these subjects just ask. |
|||
|
11-11-2008, 01:34 AM
(This post was last modified: 11-11-2008 01:35 AM by goughy000.)
Post: #4
|
|||
|
|||
|
RE: New to PHP need a little help with member scripts.
think of your logic
your doing "if the user is logged in then ask them to login" "else (ie there not logged in) tell them there logged in" see what i mean? what you should be doing is the opposite, you can make this simple change with 1 character instead of if(isset(..... add the ! character which means "not" in a sense, so it becomes if(!isset(... so then your logic is "if username NOT set then they are not logged in thus show the login form" etc ![]() Web Hosting | Shoutcast Servers | Custom Solutions |
|||
|
11-11-2008, 09:08 AM
Post: #5
|
|||
|
|||
|
RE: New to PHP need a little help with member scripts.
Ah, another satisfied
![]() Epic quote: "Posts should be as short as short skirts, short enough to cover enough, not too long that it covers too much." |
|||
|
12-29-2008, 04:48 AM
Post: #6
|
|||
|
|||
|
Sorry I didn't get back to you guys,
My PC broke and then I din't have time so I did fix it like goughy said. And also I have moved on alot more now (beleive it or not). Thanks for the help
If anyone ever needs any help with PHP, HTML, CSS, JavaScript, AJAX or MySql just ask. Also If anyone would like me to create a tutorial about anything to do with these subjects just ask. |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| PHP Scripts [Read First] | progogre | 1 | 378 |
06-22-2008 04:46 AM Last Post: progogre |
|










![[Image: GHST_Sig.png]](http://i124.photobucket.com/albums/p19/nevercracker/GHST_Sig.png)