Problems with Internet Explorer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
amgnick
Forum Newbie
Posts: 2
Joined: Tue Apr 07, 2009 2:32 pm

Problems with Internet Explorer

Post by amgnick »

We have a problem with some code that is working perfectly in Firefox, but not so much in Internet Explorer.

1. Search problem. When you hit enter on the keyboard to perform a search, it just refreshes the page. This means that it runs the script that loads the page, but doesn't run the script that displays the data searched. Oddly, if you actually click Search, it works.

2. Form submission problem. When the person clicks submit, it updates the database it came from, but won't enter the new database it's supposed to go to. It seems to be that it's running one action, but not the other.

The problems seem to be related. Internet Explorer isn't recognizing that two actions need to take place when the respective buttons are clicked.

I can post code, but thought maybe someone would have encountered this type of issue before.
User avatar
greyhoundcode
Forum Regular
Posts: 613
Joined: Mon Feb 11, 2008 4:22 am

Re: Problems with Internet Explorer

Post by greyhoundcode »

I vote you post your code :)
amgnick
Forum Newbie
Posts: 2
Joined: Tue Apr 07, 2009 2:32 pm

Re: Problems with Internet Explorer

Post by amgnick »

Not gonna let me be lazy and turn up some pure magical answer, huh? :wink:

It looks like our search issue has been resolved. Still having problem with the submission of information through a form. It's supposed to update the database it is posting to and update the record in the database it is coming from. Below, you see onSubmit='leadadded.php' which calls the function to update the file in it the database it comes from.

Here's the form tag:

Code: Select all

<form name ='formname' method='post' action="postingURLhere" onSubmit='leadadded.php' >
Here's the php code for leadadded.php. Salesperson is the field that is getting updated in the initial database. The rest of the record does not need to be updated.

Code: Select all

<?php
echo'leadadded';
$salesperson =  $HTTP_POST_VARS['salesperson'];
$email = $HTTP_POST_VARS['email'];
echo $salesperson;
$salesperson = addslashes($salesperson);
$email = addslashes($email);
echo $email;
@$db= mysql_pconnect('localhost', 'username', 'password');
if(!$db)
{
echo'the required database could not be opened';
exit;
}
echo 'mysql database';
mysql_select_db('database');
$query = " UPDATE Prospects SET salesperson ='".$salesperson."' WHERE email ='".$email."'";
$result = mysql_query($query);
echo $result;
echo 'lead end';
?>
 
If you need more, let me know and thanks for looking at this.
Post Reply