List:General Discussion« Previous MessageNext Message »
From:Erik Price Date:June 17 2002 7:34pm
Subject:Re: IIS Issues - Hope Not, Variables undifined in MySql
View as plain text  
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 
> decision)
> however everytime that I tried to send a variable from an HTML code to 
> MySql
> database or Microsoft Access database, via PHP script I am getting an
> "Undefined Variables .......",  you can test at 
> www.pentium-3.com/logon.html
> 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 
> HTML
> 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.

Try doing

$username = "tokunboh";

immediately before your SQL statement and make sure that it is in fact 
being defined in your code.


Erik




----

Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@stripped

Thread
IIS Issues - Hope Not, Variables undifined in MySqlTokunboh Oladejo17 Jun
  • Re: IIS Issues - Hope Not, Variables undifined in MySqlErik Price17 Jun
  • Re: IIS Issues - Hope Not, Variables undifined in MySqlChris Knipe17 Jun
RE: IIS Issues - Hope Not, Variables undifined in MySqlScott L Hathaway17 Jun
RE: IIS Issues - Hope Not, Variables undifined in MySqlTokunboh Oladejo17 Jun