|
|||
Hey,
There are a few thing that you could do to try fix this: 1) Make sure that C:/php/foldersimpansession exists then change your php.ini session.save_path to: C://php//foldersimpansession or C:\\php\\foldersimpansession (Note the double slash) -- OR -- 2) Make a tmp directory on the root of C, so C:/tmp and change your php.ini to: session.save_path = \tmp (It doesn't have to be tmp, could be anything really) This problem is not very common, because I have a box running the exact same version - Apache 2.47 and PHP 4.3.3 and the default save_path is C:\PHP\sessiondata But try one of those two (or both) and see if it helps. Last edited by sufyan; 02-10-2003 at 09:25 AM. |
|
||||
need helps.. / opinions.
currently i've two tables one is for users login info = users the other is users' profile = profile users login would have username & password and id fields profile would have more info about users. id in table users is set to be primary. my question.. do i really need to have two tables or just dump the whole things in one table? if i have two, i need to have a field in table profile that refer to table 1 = users.. am i right? ok, let's say i want to authenticate using the users table then redirect to display user profiles from profile table.. how do i do that..? tq. so much.
__________________
::nevland:: the land of nowhere |
|
|||
Hi there,
It depends on how your designing your system/how you want it to work. If each user only has ONE profile, the best thing to have is only one table. If the user may have more than one profile, you would need two seperate tables. Each of your tables should have a key and you can use these keys to indentify the record and what it belongs to. So for example, you have a user, Jim, with the ID# 1 in the user table, the other table (profiles) will use that key as reference. So if you want to view Jim's profile you would select it from the database where UserID = 1. Quote:
SELECT * FROM Users WHERE ID=" . $_SESSION["UserID"] After that just use your regular code to print/display the profile once it has been selected. |
|
||||
thanks man..
here have a look with my authentication script.. sape2 yg terror tolong tgk coding ni.. Quote:
nama file ni aku bagi auth.php dekat form html aku yg ada login info (username, password) aku taruk lah form action ="auth.php" ... what do you think..? i havent' got this work though..
__________________
::nevland:: the land of nowhere Last edited by nevland; 08-10-2003 at 07:30 PM. |
|
|||
hey there...
just one question... in your database are the password md5 encrypted? If not... that's you problem. By the way, that script is terrible. There is a very obvious backdoor. If I knew a user name to your site, for example 'jim' was a registered user, i could type: Username: jim'"); // and typed anything in the password field and it would accept it. When thats done, your *effective* script looks smthing like this: $sql = mysql_query("SELECT * FROM myprofile WHERE username='jim'"); //' AND password='$password'"); See what it does... it comments out ' AND password='$password'"); bypassing the password check making your *authenticate* script useless. Last edited by sufyan; 08-10-2003 at 04:46 PM. |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Install PHP-Nuke Dalam Localhost | cangssithra | Website Programming | 6 | 26-04-2008 11:20 AM |
| localhost machine software | calvynlee | Mamak Stall | 12 | 20-11-2006 02:57 PM |
| Session Problem | koisempoi | Website Programming | 6 | 22-12-2005 05:27 PM |
| can't connect to mysql server on localhost | nurulmajdi | Website Programming | 6 | 16-02-2004 03:57 PM |
| Does we need iis to set php as my localhost server | Syazwan | Website Programming | 15 | 07-10-2003 08:30 PM |
All times are GMT +8. The time now is 04:23 AM.
Powered by vBulletin® Version 3.7.3<













Linear Mode

