PHP/MySQL help |
Author: |
Message: |
lordy
Senior Member
Posts: 853 Reputation: 24
35 / /
Joined: Jul 2004
Status: Away
|
O.P. RE: PHP/MySQL help
*sigh* can someone explain to me why this wont work?
i copied this out of a magazine (the tutorial im following) and ive already fixed a few errors i found in it, but for some reason, when i load the page, nothing happens, i just get a blank screen, so can someone look at this file and see if they can find any errors in it? thanks.
Removed file, see later post
This post was edited on 11-18-2005 at 05:29 AM by lordy.
|
|
11-18-2005 03:41 AM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
RE: PHP/MySQL help
quote: Originally posted by lordy16
edit: fixed a few REALLY stupid errors but still doesnt work
There are still at least 3 stupid errors... keep working...
I assume you didn't type it very carefully when copying from the magazine?
|
|
11-18-2005 04:50 AM |
|
|
lordy
Senior Member
Posts: 853 Reputation: 24
35 / /
Joined: Jul 2004
Status: Away
|
O.P. RE: PHP/MySQL help
i checked it afterwards, the magazine wasa bit dodgy with thier quotation marks and stuff, can you point out what the errors are?
i re-uploaded the file, with a few corrections
This post was edited on 11-18-2005 at 05:14 AM by lordy.
|
|
11-18-2005 05:07 AM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
RE: PHP/MySQL help
Line 23
VALUES ("
VALUES (''
(Replace double quote with 2 single quotes)
Line 23 Again
$_GET["dvd_actors"]].
$_GET["dvd_actors"].
(Remove extra bracket)
Line 29
$_GET['dvd_id']";
$_GET['dvd_id'];
(Remove extra quote)
Line 115
print(<tr>
print("<tr>
(Quote was missing)
|
|
11-18-2005 05:14 AM |
|
|
lordy
Senior Member
Posts: 853 Reputation: 24
35 / /
Joined: Jul 2004
Status: Away
|
O.P. RE: PHP/MySQL help
quote: Originally posted by WDZ
Line 29
$_GET['dvd_id']";
$_GET['dvd_id'];
(Remove extra quote)
but that has to be there? ive fixed everthing else and still no deal
|
|
11-18-2005 05:21 AM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
RE: PHP/MySQL help
No, it doesn't have to be there. This is one string...
"SELECT * FROM movies WHERE dvd_id = "
And $_GET['dvd_id'] is simply concatenated on to the end of that.
|
|
11-18-2005 05:28 AM |
|
|
lordy
Senior Member
Posts: 853 Reputation: 24
35 / /
Joined: Jul 2004
Status: Away
|
O.P. RE: PHP/MySQL help
have a look at this one, it still doesnt work
Attachment: index2.php (3.63 KB)
This file has been downloaded 96 time(s).
|
|
11-18-2005 05:32 AM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
RE: PHP/MySQL help
You didn't remove the extra bracket.
code: "','".$_GET["dvd_actors"]]."','"
See the double brackets ]] there? Remove one. That should make the script free of all syntax errors.
|
|
11-18-2005 05:47 AM |
|
|
lordy
Senior Member
Posts: 853 Reputation: 24
35 / /
Joined: Jul 2004
Status: Away
|
O.P. RE: PHP/MySQL help
its not in there in the page on my server and it still doesnt do anything, it just pops up with a blank page., i'm stumped
|
|
11-18-2005 05:50 AM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
RE: PHP/MySQL help
Well, that's strange that it's completely blank. If you view the source of the page, is that blank? Do other PHP scripts work on your server? Do you have the MySQL configuration correct?
|
|
11-18-2005 05:53 AM |
|
|
Pages: (3):
« First
«
1
[ 2 ]
3
»
Last »
|
|