473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

sending and receiving wrong information

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 te*****@testing.com for username and testing for password at
modify.php, but modify2.php echoes te**@test.com for username and test
for password. Why???
Jun 27 '08 #1
5 1168
On 4 Jun, 09:03, Raistlin Majere <pedbe...@gmail.comwrote:
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.

Jun 27 '08 #2
On Jun 4, 9:03 am, Raistlin Majere <pedbe...@gmail.comwrote:
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 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???
you've not provided anything like enough information for anyone here
to make a meaningful diagnosis. The only advice I can offer is, "If
in doubt, echo out". Put code in to echo out all the variables you're
working with to make sure they really do contain what you think they
do.
Jun 27 '08 #3
On 4 jun, 06:26, Captain Paralytic <paul_laut...@yahoo.comwrote:
On 4 Jun, 09:03, Raistlin Majere <pedbe...@gmail.comwrote: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.
function sanitize($method, $variable)
{
$variable=$_{$method}[$variable];
$variable=htmlentities($variable);
$variable=mysql_real_escape_string($variable);
}
Jun 27 '08 #4
Raistlin Majere wrote:
On 4 jun, 06:26, Captain Paralytic <paul_laut...@yahoo.comwrote:
>On 4 Jun, 09:03, Raistlin Majere <pedbe...@gmail.comwrote: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.

function sanitize($method, $variable)
{
$variable=$_{$method}[$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.
js*******@attglobal.net
==================
Jun 27 '08 #5
On 5 Jun, 01:27, Raistlin Majere <pedbe...@gmail.comwrote:
On 4 jun, 06:26, Captain Paralytic <paul_laut...@yahoo.comwrote:
On 4 Jun, 09:03, Raistlin Majere <pedbe...@gmail.comwrote: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.

function sanitize($method, $variable)
{
$variable=$_{$method}[$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.
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Marcelo | last post by:
Hi guys, I'm using the following code to send values from one page to another, but seems to me, that the event Page_Load in the receiving page never fires. Why? This is the code: Thanks ...
2
by: Dee | last post by:
Hi I have added EnableViewStateMac="false" to the sending WebForm's @Page Directive and my sample code has the following line: Dim coll As...
9
by: Miro | last post by:
VB 2003 at the end of the code, this works great. bytCommand = Encoding.ASCII.GetBytes("testing hello send text") udpClient.Send(bytCommand, bytCommand.Length) and this recieves it Dim...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
0
by: george585 | last post by:
Hello! I am new to network programming, and understand just basics. Using some sample code, and having read documentation, I managed to create a simple app in C# and VB.NET. The application is...
3
by: shybe | last post by:
I have a send mail script on my site that. The emails are recieved by gmail, and yahoo, but not to mail clients like Outlook, Mail, etc...) Is this a problem with the script, or is it...
7
by: bleachie | last post by:
Hey, I just need some help, my form seems to not send me all of the 'guestNames' and 'guestEmails' forms. i use this function to add more guestnames and guestemail fields based on the number of...
1
by: Rich | last post by:
Hello, I am working on a python library for sending and receiving data from a Subaru's ECU (the fuel injection computer) via the OBD-II port and an OBD to USB cable, with the Subaru Select Monitor...
5
by: hurricane_number_one | last post by:
I am creating a simple server application, that will listen for incoming mouse coordinates and then move the mouse accordingly. So basically it's like a very simple VNC server without and screen...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.