in the first line of the code you are refering to $_GET[option]

option in this case is being seen as a constant.

if you were to put single or double quotes it would work.

the second notice means that in the $_GET array, there isn't a key called
option

it would probably work better if you did this.

if(empty($_GET['option'])) {
  your code here
}


----- Original Message -----
From: "Tyler Longren" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 11:01 AM
Subject: [PHP] What do these errors mean?


> Hi,
>
> I was looking through php.ini and noticed that show_error was set to Off.
I
> turned it On, and now I see these errors on one of my pages:
> Notice: Use of undefined constant option - assumed 'option' in
> /usr/local/apache/htdocs/tyler/encodeDecode.php on line 37
>
> Notice: Undefined index: option in
> /usr/local/apache/htdocs/tyler/encodeDecode.php on line 37
>
> Here's line 37-42:
> if ($_GET[option] == "") {
>  print "<font face=Arial size=4><b>Add Credit Card</b></font><br>";
>  print "<form method=POST action=encodeDecode.php?option=encrypt>
>  <font face=Arial size=2><b>Credit Card Number:</b></font> <input
type=text
> name=cc><br>
>  <input type=submit value=Add></form>";
> }
>
> What's wrong with that?
>
> Thanks,
> Tyler
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to