Re: Undefined variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



testing

"Louis Young" <louis@xxxxxxxxxxxxx> wrote in message
news:41E54A02.3000604@xxxxxxxxxxxxxxxx
> Hi there
>
> I'm getting the following error regardless of whether register_globals
> is on or off.
>
> *Notice*: Undefined variable: button1 in *C:\Program Files\Apache
> Group\Apache2\htdocs\spar\admin\login.php* on line *28
>
> Here's the code for the entire page:
>
> <?
>   session_start();
>   session_register("Login_session");
>   session_register("Outlet_session");
> ?>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>
> <html>
> <head>
>
>
>     <meta name="Description" content="Kwikpay keeps electronic commerce
> simple and smart, providing a total solution for delivering a virtual
> payment. Empowering customers to manage their financial obligations
> anytime and anywhere with products which are user-friendly is what lies
> at the core of Kwikpay's business. The core business of Kwikpay is to
> empower customers to manage their financial obligations anytime and
> anywhere through smart products that are easy to use and manage. It is
> the principal objective of Kwikpay to fundamentally enhance the value,
> volume, quality and accessibility of e-commerce products and services
> offered at point of sale. This objective is reflected in our mission
> statement: To be the leading provider of electronic commerce solutions,
> facilitating transactions that enhance the ability of any business to
> satisfy their customers">
>     <meta name="Keywords" content="KWIK, kwik, Kwik, Pay, PAY, Kwikpay,
> KwikPay, KWIKPAY, quick, Quick, quickpay, QuickPay, Business, Magic,
> electronic, commerce, customers, products, solutions, transactions,
> Prepaid Cellular, Vodacom, MTN, Cell-C, Telkom, Century City, Cape Town,
> Kwikpay SA, Johannesburg, Durban, Port Elizabeth, Bloemfontein, SA, sa,
> terminal, terminal, customer,Internet, support, Benefits">
>
>     <title>Kwikpay</title>
>
>     <link rel="STYLESHEET" type="text/css" href="../style/style.css">
>     <script language="javascript" src="../scripts/functions.js"></script>
>     <script language="JavaScript1.2" src="../scripts/fw_menu.js"></script>
>     <script language="javascript" src="../scripts/links.js"></script>
> </head>
>
> <body bgcolor="#FFFFFF" leftmargin="0" rightmargin="0" marginheight="0"
> marginwidth="0" topmargin="0">
>
>
> <?
> $ErrorMessage="";
> if (${"button1"}=="Login" && ${"siteno"}!="" && ${"password"}!="" &&
> ${"emailaddress"}!="")
> {
>
> // $oConnection is of type "ADODB.Connection"
>
> // $oRecordset is of type "ADODB.Recordset"
>
>
>   $a2p_connstr=$Application["ConnectionString"];
>   $a2p_uid=strstr($a2p_connstr,'uid');
>   $a2p_uid=substr($d,strpos($d,'=')+1,strpos($d,';')-strpos($d,'=')-1);
>   $a2p_pwd=strstr($a2p_connstr,'pwd');
>   $a2p_pwd=substr($d,strpos($d,'=')+1,strpos($d,';')-strpos($d,'=')-1);
>   $a2p_database=strstr($a2p_connstr,'dsn');
>
$a2p_database=substr($d,strpos($d,'=')+1,strpos($d,';')-strpos($d,'=')-1);
>   $oConnection=mysql_connect("localhost",$a2p_uid,$a2p_pwd);
>   mysql_select_db($a2p_database,$oConnection);
> $oRecordset=$oRecordset_query=mysql_query(("SELECT * FROM tbl_WWWUsers
> WHERE szOutlet = '".trim(${"SiteNo"})."' AND szPassword LIKE
> '".trim(${"Password"})."' AND szEmail LIKE '".trim(${"EmailAddress"})."'
> AND iActive = 1"),$oConnection);
> $oRecordset=mysql_fetch_array($oRecordset_query);
>
>   if (!($oRecordset==0))
>   {
>
> // [unsupported] session.timeout=20;
>     $Login_session=true;
>     $Outlet_session=$oRecordset["szOutlet"];
>     $oRecordset=null;
>
>     $oConnection=null;
>
>     header("Location: "."clientmenu.asp");
>   }
>     else
>   {
>
>     $ErrorMessage="One of the fields are not correct and cannot be
> validated, <br> or your outlet has not been registered - please register
!";
>   }
>
>
> }
>
> ?>
>
>
> <!-- Main Table -->
> <table cellpadding="0" cellspacing="0" border="0" width="770">
>     <tr>
>         <td align="left" valign="top">
>             <!-- Table 1 -->
>             <table cellpadding="0" cellspacing="0" border="0"
> bgcolor="#99CC33" width="770">
>                 <tr>
>                     <td align="left" valign="top"><a
> href="../main.php"><img src="../images/kplogo.gif" alt="" width="87"
> height="86" border="0"></a></td>
>                     <td align="left" valign="top">
>                         <table cellpadding="0" cellspacing="0"
> border="0" bgcolor="#99CC33" width="457">
>                             <tr>
>                                 <td align="left" valign="top"
> colspan="2"><img src="../images/shim.gif" alt="" width="457" height="27"
> border="0"></td>
>                             </tr>
>                             <tr>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="15" height="33" border="0"></td>
>                                 <td align="left" valign="middle"
> class="blueheader">Outlet Login</td>
>                             </tr>
>                             <tr>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="15" height="26" border="0"></td>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="450" height="26" border="0"></td>
>                             </tr>
>                         </table>
>                     </td>
>                     <td align="left" valign="top">
>                         <table cellpadding="0" cellspacing="0"
> border="0" bgcolor="#99CC33" width="226">
>                             <tr>
>                                 <td align="left" valign="top"
> colspan="12"><img src="../images/shim.gif" alt="" width="226"
> height="27" border="0"></td>
>                             </tr>
>                             <tr>
>                                 <td align="left" valign="top"><a
> href="../new.php" onMouseOut="MM_swapImgRestore()"
>
onMouseOver="MM_swapImage('new','','../images/navigation/t1_over.gif',1)"><i
mg
> src="../images/navigation/t1.gif" alt="What's New" name="new" id="new"
> width="33" height="33" border="0"></a></td>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="4" height="33" border="0"></td>
>                                 <td align="left" valign="top"><a
> href="../kwikpayuk.php" onMouseOut="MM_swapImgRestore()"
>
onMouseOver="MM_swapImage('world','','../images/navigation/t2_over.gif',1)">
<img
> src="../images/navigation/t2.gif" alt="Kwik around the world"
> name="world" id="world" width="33" height="33" border="0"></a></td>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="4" height="33" border="0"></td>
>                                 <td align="left" valign="top"><a
> href="../loginintro.php" onMouseOut="MM_swapImgRestore()"
>
onMouseOver="MM_swapImage('login','','../images/navigation/t3_over.gif',1)">
<img
> src="../images/navigation/t3.gif" alt="Outlet Login" name="login"
> id="login" width="33" height="33" border="0"></a></td>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="4" height="33" border="0"></td>
>                                 <td align="left" valign="top"><a
> href="index.php" onMouseOut="MM_swapImgRestore()"
>
onMouseOver="MM_swapImage('home','','../images/navigation/t4_over.gif',1)"><
img
> src="../images/navigation/t4.gif" alt="Home" name="home" id="home"
> width="33" height="33" border="0"></a></td>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="4" height="33" border="0"></td>
>                                 <td align="left" valign="top"><a
> href="mailto:info@xxxxxxxxxxxxx"; onMouseOut="MM_swapImgRestore()"
>
onMouseOver="MM_swapImage('contact','','../images/navigation/t5_over.gif',1)
"><img
> src="../images/navigation/t5.gif" alt="Contact Us" name="contact"
> id="contact" width="33" height="33" border="0"></a></td>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="4" height="33" border="0"></td>
>                                 <td align="left" valign="top"><a
> href="../sitemap.php" onMouseOut="MM_swapImgRestore()"
>
onMouseOver="MM_swapImage('sitemap','','../images/navigation/t6_over.gif',1)
"><img
> src="../images/navigation/t6.gif" alt="Site Map" name="sitemap"
> id="sitemap" width="33" height="33" border="0"></a></td>
>                                 <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="4" height="33"
> border="0"></td>
>                             </tr>
>                             <tr>
>                                 <td align="left" valign="top"
> colspan="12"><img src="../images/shim.gif" alt="" width="226"
> height="26" border="0"></td>
>                             </tr>
>                         </table>
>                     </td>
>                 </tr>
>             </table>
>            </td>
>     </tr>
>     <tr>
>         <td align="left" valign="top">
>             <!-- Table 2 -->
>             <table cellpadding="0" cellspacing="0" border="0"
> width="780"  background="../images/clientbackground.jpg">
>                 <tr>
>                     <td align="left" valign="top" colspan="2"><img
> src="../images/shim.gif" alt="" width="780" height="20" border="0"></td>
>                 </tr>
>                 <tr>
>                     <td align="left" valign="top" width="20"><img
> src="../images/shim.gif" alt="" width="20" height="10" border="0"></td>
>                     <td align="left" valign="top" width="750">
>
>                     <!--- Main Content --->
>                        <table cellpadding="0" cellspacing="0"
> border="0">
>                          <tr>
>                              <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="50" height="10" border="0"></td>
>                             <td align="center" valign="top" colspan="3">
>                                 <table cellpadding="0" cellspacing="0"
> border="0">
>                                     <form action="login.php"
> method="post" id="MyForm" name="MyForm">
>                                     <tr>
>                                         <td align="center" valign="top"
> colspan="4" class="redtext"><? if ($ErrorMessage!="")
> {
> ?><?   echo $ErrorMessage; ?><br><br><? }
>   else
> {
> ?><br><br><br> <? } ?></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="left" valign="top"
> colspan="4"><img src="../images/shim.gif" alt="" width="1" height="5"
> border="0"></td>
>                                     </tr>
>
>                                     <tr>
>                                         <td align="right" valign="top"
> class="bluetext">Outlet No:</td>
>                                         <td align="left"
> valign="top"><img src="../images/shim.gif" alt="" width="10" height="1"
> border="0"></td>
>                                         <td align="left"
> valign="top"><INPUT name="SiteNo" maxlength="8" size="6" value="<? echo
> $Outlet_session; ?>"></td>
>                                         <td align="left"
> valign="top"><img src="../images/shim.gif" alt="" width="100" height="1"
> border="0"><a href="../loginintro.php" class="pagecontent"><img
> src="../images/buttons/howtoreg.gif" alt="Register" width="153"
> height="35" border="0"></a></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="left" valign="top"
> colspan="3"><img src="../images/shim.gif" alt="" width="1" height="5"
> border="0"></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="left" valign="top"
> class="bluetext">Email Address:</td>
>                                         <td align="left"
> valign="top"><img src="../images/shim.gif" alt="" width="10" height="1"
> border="0"></td>
>                                         <td align="left"
> valign="top"><INPUT name="emailaddress" maxlength="40" size="30"
> value="<? echo trim(${"emailaddress"}); ?>"></td>
>                                         <td align="left"
> valign="top"><img src="images/shim.gif" alt="" width="100" height="1"
> border="0"><a href="password.php"><img
> src="../images/buttons/forgotpassword.gif" alt="Forgot Password"
> width="153" height="35" border="0"></a></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="left" valign="top"
> colspan="3"><img src="../images/shim.gif" alt="" width="1" height="5"
> border="0"></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="right" valign="top"
> class="bluetext">Password:</td>
>                                         <td align="left"
> valign="top"><img src="../images/shim.gif" alt="" width="10" height="1"
> border="0"></td>
>                                         <td align="left"
> valign="top"><INPUT name="password" type=password  maxlength="20"
> size="20></td>
>                                         <td align="left"
> valign="top">&nbsp;</td>
>                                     </tr>
>                                     <tr>
>                                         <td align="left" valign="top"
> colspan="4"><img src="../images/shim.gif" alt="" width="1" height="60"
> border="0"></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="left" valign="top"
> colspan="4"><img src="../images/shim.gif" alt="" width="1" height="20"
> border="0"></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="center" valign="top"
> colspan="4"><INPUT type="submit" value="Login" id="button1"
> name=button1>&nbsp;<INPUT type="reset" value="Reset" id=button2
> name=button2></td>
>                                     </tr>
>                                     </form>
>                                     <tr>
>                                         <td align="left" valign="top"
> colspan="4"><img src="../images/shim.gif" alt="" width="1" height="20"
> border="0"></td>
>                                     </tr>
>                                     <tr>
>                                         <td align="left" valign="top"
> colspan="4" class="bluetext">
>                                             <table cellpadding="0"
> cellspacing="0" border="0">
>                                                 <tr>
>                                                     <td align="left"
> valign="top" class="bluetext">
>                                                     <u>Please Note</u>:
>                                                     </td>
>                                                     <td align="left"
> valign="top" class="bluetext">
>                                                     <img
> src="../images/shim.gif" alt="" width="5" height="1" border="0">
>                                                     </td>
>                                                     <td align="left"
> valign="top" class="bluetext">
>                                                     Notification of
> change of email address shall be provided to Kwikpay<br> in writing with
> immediate effect of the change being actioned.
>                                                     </td>
>                                                 </tr>
>
>                                             </table>
>                                         </td>
>                                     </tr>
>                                 </table>
>                             </td>
>                          </tr>
>                          <tr>
>                            <td align="left" valign="top"><img
> src="../images/shim.gif" alt="" width="100" height="30" border="0"></td>
>                            <td align="left" valign="top" colspan="3"></td>
>                          </tr>
>                       </table>
>
> Cheers
> Louis
> *

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


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux