On Monday, June 17, 2002, at 03:12 PM, Tokunboh Oladejo wrote:
> I am running MySql and PHP on IIS 5 (Hope I haven't made a wrong
> however everytime that I tried to send a variable from an HTML code to
> database or Microsoft Access database, via PHP script I am getting an
> "Undefined Variables .......", you can test at
> and put in any combination of Username and Password.
> I am sending a SELECT statement "$sql="SELECT USERNAME FROM AGENTS WHERE
> USERNAME='$Username' and PASSWORD='$Password'";
> I am getting Undefined Variable Username and Password on Line ...
> Despite the fact that $Username and $Password has been defined in the
> code, the values is not being carried accross to the php script.
> If anyone knows what I am talking about HELLLLPPPPPPPPP !!!!!!!!!.
Are they really defined in the HTML code? Because actually these need
to be defined in the PHP section of your scripts (somwhere between <?php
and ?>). It is possible that you're not using superglobals ($_GET or
$_POST) though I can't tell from your post.
$username = "tokunboh";
immediately before your SQL statement and make sure that it is in fact
being defined in your code.
Web Developer Temp
Media Lab, H.H. Brown