Click here to get back home

sending and receiving wrong information

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
sending and receiving wrong information Raistlin Majere 06-04-2008
Get Chitika Premium
Posted by Raistlin Majere on June 4, 2008, 4:03 am
Please log in for more thread options
with css label is on the left and labelled is on the right
without css, label is on the top and labelled is on the bottom


If modify.php is:

<form action="modify2.php" method="post">
<div class="category">
Modify
</div>
<div class="element">
<div id="label">
Email:
<br>
<br>
Password:
</div>
<div id="labelled">
<input name="email" class="text" type="text" size="40"
value="<? echo $email; ?>" id="email">
<br>
<br>
<input name="password" class="text" type="password"
size="20" value="<? echo $password; ?>" id="password">
<br>
<br>
<input type="submit" class="button" value="Modify">
</div>
<div class="hack">
</div>
</div>
</form>



and modify2.php is:

session_start();
include ('../others/automatic.php');
mysql_connect("localhost", $mysql_username, $mysql_password) or
die(mysql_error());
mysql_select_db("Intermediary") or die(mysql_error());
sanitize("post", "email");
sanitize("post", "password");
echo $email;
echo $password;
mysql_close();


I type testing@testing.com for username and testing for password at
modify.php, but modify2.php echoes test@test.com for username and test
for password. Why???

Posted by Captain Paralytic on June 4, 2008, 5:26 am
Please log in for more thread options
> with css label is on the left and labelled is on the right
> without css, label is on the top and labelled is on the bottom
I have no idea what this is supposed to mean!!!

> sanitize("post", "email");
> sanitize("post", "password");
> echo $email;
> echo $password;
>
> I type test...@testing.com for username and testing for password at
> modify.php, but modify2.php echoes t...@test.com for username and test
> for password. Why???

I suspect it has something to do with sanitize(), but you didn't post
the details of that function.


Posted by Raistlin Majere on June 4, 2008, 8:27 pm
Please log in for more thread options
is on the left and labelled is on the right
> > without css, label is on the top and labelled is on the bottom
>
> I have no idea what this is supposed to mean!!!
>
> > sanitize("post", "email");
> > sanitize("post", "password");
> > echo $email;
> > echo $password;
>
> > I type test...@testing.com for username and testing for password at
> > modify.php, but modify2.php echoes t...@test.com for username and test
> > for password. Why???
>
> I suspect it has something to do with sanitize(), but you didn't post
> the details of that function.

function sanitize($method, $variable)
{
$variable=$_[$variable];
$variable=htmlentities($variable);
$variable=mysql_real_escape_string($variable);
}

Posted by Jerry Stuckle on June 4, 2008, 9:39 pm
Please log in for more thread options
Raistlin Majere wrote:
is on the left and labelled is on the right
>>> without css, label is on the top and labelled is on the bottom
>> I have no idea what this is supposed to mean!!!
>>
>>> sanitize("post", "email");
>>> sanitize("post", "password");
>>> echo $email;
>>> echo $password;
>>> I type test...@testing.com for username and testing for password at
>>> modify.php, but modify2.php echoes t...@test.com for username and test
>>> for password. Why???
>> I suspect it has something to do with sanitize(), but you didn't post
>> the details of that function.
>
> function sanitize($method, $variable)
> {
> $variable=$_[$variable];
> $variable=htmlentities($variable);
> $variable=mysql_real_escape_string($variable);
> }

$_post is NOT the same as $_POST!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Posted by Captain Paralytic on June 5, 2008, 6:18 am
Please log in for more thread options
>
>
>
is on the left and labelled is on the right
> > > without css, label is on the top and labelled is on the bottom
>
> > I have no idea what this is supposed to mean!!!
>
> > > sanitize("post", "email");
> > > sanitize("post", "password");
> > > echo $email;
> > > echo $password;
>
> > > I type test...@testing.com for username and testing for password at
> > > modify.php, but modify2.php echoes t...@test.com for username and test
> > > for password. Why???
>
> > I suspect it has something to do with sanitize(), but you didn't post
> > the details of that function.
>
> function sanitize($method, $variable)
> {
> $variable=$_[$variable];
> $variable=htmlentities($variable);
> $variable=mysql_real_escape_string($variable);
>
> }

Are you sure that what you have shown us as the contents of
modify2.php is really all that is in it and do you have Register
Globals switched on?

Your sanitize function is not valid php and should display some
errors. It is certainly not going to influence the contents of any
variables in the main modify2.php script.

Similar ThreadsPosted
sending/receiving (handling) mails thru PHP February 16, 2005, 7:38 am
Sending Information to an email - but need new lines.. September 18, 2006, 5:24 am
Sending sensitive information to an HTTPS page March 21, 2007, 7:02 am
Receiving variable from session September 2, 2004, 5:58 am
Curl receiving different pages September 13, 2004, 8:57 pm
Re: Curl receiving different pages September 14, 2004, 3:07 am
not receiving emails expected September 27, 2007, 5:15 pm
recovering parameters passed with URL on the receiving PHP end October 2, 2004, 12:25 pm
Problem receiving an array with php5/soap from a gsoap server July 13, 2006, 11:36 am
kept information September 3, 2004, 4:28 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap