Forums

PHP

This topic is locked

Function Return Value/Write Context/MX2004/PHP

Posted 28 Aug 2006 18:08:41
1
has voted
28 Aug 2006 18:08:41 Paul Dowgewicz posted:
I think I've searched this error out without getting a solution.

I'm going through SAM's Teach Yourself Dreamweaver MX Application Development in 21 Days. I'm using DWMX2004, so there are some differences. Nothing like finding books on the discount shelf.<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I'm at the chapter on creating login pages. I'm using Windows XP / Apache 2.2.3 / MySQL 5.0.24 / PHP 5.2. The author primarily uses ASP so it's some more effort on my part to correlate some items.

From the page where the username/password gets entered, it submits to a verify page. There I get an error:
Fatal error: Can't use function return value in write context in D:\Program Files\Apache2.2\htdocs\day13\verify.php on line 4

verify.php starts out as: (There are less-than/greater-than brackets around the 1st line, and less-than bracket beginning 2nd line. Forum software didn't like them.)

?php require_once('Connections/connDay13.php'); ?
?php
$varUsername_rsLogin = "none";
if (isset(Request("username")) {
$varUsername_rsLogin = (get_magic_quotes_gpc()) ? Request("username" : addslashes(Request("username");
}
$varPassword_rsLogin = "none";
if (isset(Request("password")) {
$varPassword_rsLogin = (get_magic_quotes_gpc()) ? Request("password" : addslashes(Request("password");
}

Dreamweaver created this code based on a server behavior with the SQL command
SELECT *
FROM tbluserinfo
WHERE username='varUsername' AND password='varPassword'

and Variables:
varUsername none Request("username"
varPassword none Request("password"

Does anyone have any clues to what causes this error?

Thanks,
Paul

Reply to this topic