Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / php, please help me

Author
Message
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 00:34
i have written a login script (well, copied it from a book) and it just gives me a blank page
the result is http://cgi.lochviewwest.plus.com/login.php

this is the code:


please help, the mysql_connect.phhp consists of:


this script works on it's own (well, produces a blank page) and i have the correct names and password, i'm just not telling anyone here them.

can someone please help me

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 3rd Feb 2004 01:01 Edited at: 3rd Feb 2004 01:02
There are a fair few typos in that script:

On the $query ... line, the string starts with a single quote ' and ends with a double quote. It should both start and end with a double quote.

On the of (isset($message... line, the parenthesis count is irregular

$message is misspelt shortly after that.

Also, I suggest that you change the indentation so that it is readable:






BlueGUI Plugin:http://blue.robert-knight.net / BlueIDE http://blueide.sf.net-Free Replacement editor for DBPro
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 01:03 Edited at: 3rd Feb 2004 01:04
k, thanks alot, i'm not the best typer as you can probably see and was quite tired, thanks again.

edit: i know print is the same as echo but i'll stick with echo for now, otherwise i'll get db and php confused

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 3rd Feb 2004 01:05 Edited at: 3rd Feb 2004 01:13
Remember that in PHP lines don't end until and end-of-line character is encountered outside of a string.

Hence the rest of your code probably got swallowed into a string.

I would advise against using cookies as that example uses as well. I found recently that an awful lot of Internet Explorer 6 users couldn't use my Cookie-enabled site because of this wonderful new "feature" called "Platform for Privacy Preferences". An alternative is to use the session commands. This means that a unique ID is generated by PHP and added onto the end of all links in your code. That UID follows the user around the site. When they login, you set the username etc. in your database entry for that ID.

session.php



BlueGUI Plugin:http://blue.robert-knight.net / BlueIDE http://blueide.sf.net-Free Replacement editor for DBPro
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 01:27 Edited at: 3rd Feb 2004 01:29
new code:


it is uploadede to the same address but gives the same result

i will use sessions and stuff later but i'm still learning so i'm trying to use different things, i'll be trying it with sessions later but i want the page working first.

thanks anyway, i'll check for the missing close string

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 3rd Feb 2004 01:28
Darn, beat me to it!

Presumably error messages are turned off on your server so you don't see the nice helpful error messages that php spits out.

Put this line at top of proggy during development and it will output error debug info:

error_reporting (E_ALL);

Boo!
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 01:30
thanks spooky

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 01:39 Edited at: 3rd Feb 2004 01:48


i have tried again to fix it but i still get a blank page
i'm not going to use sessions yet, can someone please tell me what is wrong, i don't want you to fix it for me, just tell my why it doesn't work and i'll work on it.

thanks all those who have helped so far.

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
Mattman
21
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 3rd Feb 2004 01:51
php is better in many people's (including mine) opinions, this has been discussed already

mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 01:52
if i wanted to do that i wouldn't have asked for help with a php script. i'll stick with php for now thx vry mch

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 3rd Feb 2004 01:53
I'VE GOT AN IDEA <no punctuation> DROP DEAD AND LEAVE US ALONE.

Sorry, Had to do it


spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 3rd Feb 2004 02:00
If you run http://cgi.lochviewwest.plus.com/login3.php you see login form

login.php can not be what you think it is as the html and body tag is in lowercase but the 'view source' on login.php is in uppercase.

Boo!
Great Knight
21
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 3rd Feb 2004 02:49
This is what i use for my login script. I just took out some simple things.
This was my first attempt for a password check and it works fine, but i think i added some unessary things in it.


AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR, Windos XP home edition.
-----------------------And a Katana.
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 18:20 Edited at: 3rd Feb 2004 18:40

that's the coloured scrollbar, pretrty self explanitory

as for the matric effect i found the javascript somewhere, i have a version running the real matric images at http://www.lochviewwest.plus.com/desktop.html if you want them i'll send you the images and the script.

thanks all for you help, i stopped posting cause i had to go to bes but i'm back from school now so i'll try the stuff you all posted

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.
mm0zct
21
Years of Service
User Offline
Joined: 18th Nov 2003
Location: scotland-uk
Posted: 3rd Feb 2004 18:35 Edited at: 3rd Feb 2004 18:38
login3.php is just the form at the end, i put it there to check that the form worked on it's own
that's why it works

and login.php is exactly what i think it is, i don't know what is wrong but that's why i'm asking for help. login.php is the code i posted every time, i upload it overwriting the previous every time.

http://www.larinar.tk
AMD athlon thoroughbred 2200, 512Mb ram, 40Gb HD, ati saphire radeon 9600 atlantis w/128mb ddr ram, good creative-labs soundcard, cd-rw + dvd drives.

Login to post a reply

Server time is: 2024-11-24 16:25:20
Your offset time is: 2024-11-24 16:25:20