GetDotted Domains

Viewing Thread:
"PHP questions"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Sun 28/11/04 at 17:26
Regular
"Picking a winner!"
Posts: 8,502
A few more PHP questions from me. :0)

Password Encryption - Have a for that allows users to register, need some way of encrypting the passwords though, is there a built in function with php to do it or would I need to write one to do it? Also you know when you enter passwords in forms they you get **** instead of the characters being entered - how do you do that?

Sessions - How tricky is using sessions in php? Need to make sure that only registered users can access certain parts of my site, is it something that is going to take a while to do or is it straightforward enough to do?


Cheers
Fri 03/12/04 at 21:27
Regular
"Picking a winner!"
Posts: 8,502
Looking for some help.
I'm struggling to find a way of changing a date. What I need is a variable that holds todays date, using:
$dateCreated = Date('y-m-d');

I also want something that stores the date 30 days from todays date but what I've tried so far just fails.

Anyone know how to do this?

Thanks
Thu 02/12/04 at 18:03
Regular
"Picking a winner!"
Posts: 8,502
Had a bit more of a think about it. Pretty sure I can use the GET method and just pass some info about each one in the URL to a standard rating page.
Just need to work out exactly how to do it.

EDIT: Managed to get it working now. Glad that bit is done.
Wed 01/12/04 at 22:34
Regular
"Picking a winner!"
Posts: 8,502
Something else that I aint to sure on.

I am displaying a table, it shows information about films such as their name, etc. I want people to be able to submit a rating for each film and then I calculate an average for each.
First thought was that I'd have to create a page for each film to allow a rating to be made for each film.

Then I wondered if it would be possible to add an extra column to the table of all the films and have a link at the end to provide a rating.

The table is created by using a loop to loop through the database and while there is still rows in the table display the data I wish to show.

Thing is I am not sure how or if this way would be possible? Just not sure how to set it up so that when I click the rate link at the end of a row it would apply to that particular film.

Any pointers as to how it could be done or to a better suggestion?
Tue 30/11/04 at 00:06
Regular
"Devil in disguise"
Posts: 3,151
Turbonutter wrote:
> Do they not do Gameaday any more?

Sure, interesting posts only though. :P
Mon 29/11/04 at 22:11
Regular
"Eff, you see, kay?"
Posts: 14,156
Garin wrote:
> Its a pity SR don't offer a prize for the most pretentious post of the
> day. :-)


Do they not do Gameaday any more?
Mon 29/11/04 at 21:58
Regular
"Picking a winner!"
Posts: 8,502
Ah cool.

Cheers
Mon 29/11/04 at 21:49
Regular
"It goes so quickly"
Posts: 4,083
AliBoy wrote:
> Notice: Undefined index: loggedin in
> C:\Server\htdocs\Project\browse.php on line 4


I expect it is because you're using something like if ($loggedin == true) without the isset function.

Back to the register globals area, variables have to be predefined before being used in a script by default. As someone isn't logged it, I expect that the $loggedin variable hasn't been created anywhere else previously.

If this is the case, try using if (isset($loggedin) && $loggin == true) in place of if ($loggedin == true). Or, if you're searching for the loggedin variable from within a session, if (isset($_SESSION['loggedin']) && $_SESSION['loggin'] == true)
Mon 29/11/04 at 16:54
Regular
"Picking a winner!"
Posts: 8,502
Quick question about sessions.

Using sessions to check if someone is logged into a site for the various pages. If they are logged in then it displays the content, if not it returns an error.

If someone views a page (ie types in the url for it) and they are not logged in then this message comes up before my error message

Notice: Undefined index: loggedin in C:\Server\htdocs\Project\browse.php on line 4

Should that come up or is there a way to get rid of that and only show my error message that I want displayed?
Cheers
Mon 29/11/04 at 12:09
Regular
"Pouch Ape"
Posts: 14,499
Turbonutter wrote:
> Also, please note that you are NOT hashing your passwords, and that
> encrypting them is a bad idea. You need a hash (or digest) of the
> string.
>
> It's quite apparent that none of the posters in this thread know
> anything about cryptography.

Here's a riddle for you: "Up own his Turbonutter ass is" - solve that!
Mon 29/11/04 at 11:47
Regular
"Lisan al-Gaib"
Posts: 7,093
Quick aside. If you're passing a MD5 password to compare to a one stored in a mySQL server, I found that the following worked:-

Update user set password = password(md5()) where username = ""

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Thank you very much for your help!
Top service for free - excellent - thank you very much for your help.
Impressive control panel
I have to say that I'm impressed with the features available having logged on... Loads of info - excellent.
Phil

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.