Re: note 90691 rejected and deleted from language.variables.external by notes editor thiago

From: Date: Wed, 06 May 2009 13:29:41 +0000
Subject: Re: note 90691 rejected and deleted from language.variables.external by notes editor thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154284@lists.php.net to get a copy of this message
sorry i forgot to read the instructions., :) On Tue, May 5, 2009 at 8:27 PM, <php-notes@lists.php.net> wrote: > You are receiving this email because your note posted > to the online PHP manual has been removed by one of the editors. > > Read the following paragraphs carefully, because they contain > pointers to resources better suited for requesting support or > reporting bugs, none of which are to be included in manual notes > because there are mechanisms and groups in place to deal with > those issues. > > The user contributed notes are not an appropriate place to > ask questions, report bugs or suggest new features; please > use the resources listed on <http://php.net/support> > for those purposes. This was clearly stated in the page > you used to submit your note, please carefully re-read > those instructions before submitting future contributions. > > Bug submissions and feature requests should be entered at > <http://bugs.php.net/>. For documentation errors use the > bug system, and classify the bug as "Documentation problem". > Support and ways to find answers to your questions can be found > at <http://php.net/support>. > > Your note has been removed from the online manual. > > ----- Copy of your note below ----- > > i'm new in using PHP,. I'm trying to compare the $_POST ['username'] with > this variable $user which have the value of the allowed user to access the > webpage. I made the user and password statict since there's only one user. > > here's the code for the log.php, i really am not sure if i did it right: > > <? > $user_Stat ="admin"; > $Pass_Stat ="pass"; > ?> > > <? > function displayLogin($username, $password) > { > { if(isset($_POST['sublogin'])) > { > /* Check that all fields were typed in */ > if(!$_POST['user'] || !$_POST['pass']) > { > die('You didn\'t fill in a required field.'); > } > /* check length */ > $_POST['user'] = trim($_POST['user']); > if(strlen($_POST['user']) > 30) > { > die("Sorry, the username is longer than 30 characters, please > shorten it."); > } > if( $_POST['user'] == $user_Stat && $_POST['pass']== > $pass_Stat ) > { > header("Location: > http://localhost/today.php"); > } > else > { > echo ("Invalid Password or Username"); > ?> > <? > } > } > } > } > > ?> > > the form is in main.php, here's the code: > > <? > /* Include Files *********************/ > include("log.php"); > /*************************************/ > ?> > > <html> > <head> > <meta http-equiv="Content-Type" content="text/html; > charset=iso-8859-1"> > <title>LOG IN ADMIN</title> > <style type="text/css"> > <!-- > body { > background-color: #000066; > } > .style1 {color: #FFFFFF} > .style3 {font-weight: bold; font-size: xx-large; color: #000066;} > --> > </style></head> > <body> > <form action="" method="post"> > <p align="left" class="style1"><strong> > AUTHENTICATION</strong></p> > <table width="275" border="0" title="Authentication"> > > <tr> > <th width="73" scope="row"><span > class="style1"> > Username:</span></th> > <td width="186"><label> > <input type="text" name="user" /> > </label></td> > </tr> > <tr> > <th scope="row"><span > class="style1">Password:</span></th> > <td><input type="password" name="pass" > /></td> > </tr> > <tr> > <th scope="row">&nbsp;</th> > <td><input type="submit" name= "sublogin" > value="Log > In" /></td> > </tr> > </table> > <p>&nbsp;</p> > </form> > <? displayLogin($_POST ['user'], $_POST ['pass']); > ?> > </body> > </html> > > I would appreciate any help anyone can extend. > > THANKS ^____^ >

« previous php.notes (#154284) next »