Re: First Questions
| From: | Chris Knipe | Date: | Mon, 17 Jun 2002 19:21:31 +0000 |
| Subject: | Re: First Questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-102573@lists.php.net to get a copy of this message | ||
I think the <> which will be over the password, makes your browser see this
as a html tag...
What happens when you view the source of the page (from the browser), I'm
almost certain you'll see it there...
It's a browser thing... Not PHP
----- Original Message -----
From: "James Drabb" <JDrabb@darden.com>
To: "Php-General (E-mail)" <php-general@lists.php.net>
Sent: Monday, June 17, 2002 9:12 PM
Subject: [PHP] First Questions
Hey *,
I am new to this list and have a few questions. I am trying to convince my
company
to use Linux, Linux, Linux. Right now we have a site that uses IIS and ASP
and
during my lunch I am converting it to PHP and PostgreSQL/MySQL. I found a
strange
situation that I could use some help on. Here is a very simple page that
shows
what happens:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~
<html>
<head>
<title>Auth User</title>
<head>
<body>
<?
if ($_POST['uname'] != "")
{
$user = $_POST['uname'];
echo "\$user = $user<br>";
$pwd = $_POST['pass'];
echo "\$pwd = $pwd<br>";
}
?>
<form method="post" action="authuser.php">
<table><tr><td>User Name: <input type="text"
name="uname"></td></tr>
<tr><td>Password: <input type="password"
name="pass"></td></tr>
<tr><td><input type="submit" name="submit1"
value="Submit"></td></tr>
</table>
</form>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~
If you open this page up and put in jim for the user and jim for the
password and
hit submit, the page shows the output of the form vars. However, if you use
jim for the username and <jim> for the password (<,> are part of the
password) then
the password does not show up. What am I missing? does PHP do something
else
with the posted data depending on its content?
Thanks for any help,
Jim Drabb
--
-------------------------------------------------------------
Never ask a geek why, just nod your head and slowly back away
-------------------------------------------------------------
James Drabb JR
Programmer Analyst
Darden Restaurants
Business Systems
JDrabb@Darden.com
JDrabb@cfl.rr.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php