How are you?
Edited (more profound) answer:
In your HTML, you have to give names to your fields in order to retrieve them from your PHP script i.e. give your <select> element a name (attribute), like this:
<select name="fullname">
Also, the nested <option> elements should have a "value" attribute, this is because you almost always want the identification of a field to be a unique ID (so there's no mistake when refering to a table row) but you want to show useful information to the user, such as a full name.
If you plan on using an ID, then your code (in HTML) should be updated to:
<option value="<?php echo $rsNames['id']; ?>"> <?php echo $rsNames['first_Name'];?> <?php echo $rsNames['last_Name'];?></option>
This will be outputed as:
<option value="1">John Doe</option>
<option value="2">Jane Doe</option>
Then in your PHP file, it would be much easier to write a query that updates exactly the user that you want.
<?php
$id = $_GET['fullname'];
$donate_sql = "UPDATE `donate` SET donate_Total = donate_Total + {$_GET['value']} WHERE id = $id";
mysql_query($donate_sql);
?>
If you don't plan on using an ID, you have to face the fact that if 2 users are called John Doe, you'll be updating the "total" amount of donation for both of them, and it's going to be a bit more complicated for you to parse the information.
Say you DON'T want to use an ID and you want to stick with your first and last name, then you would write something like:
<option value="<?php echo $rsNames['first_Name'] . '||' . $rsNames['last_Name'];?>"><?php echo $rsNames['first_Name'];?> <?php echo $rsNames['last_Name'];?></option>
Which would produce an output similar to:
<option value="John||Doe">John Doe</option>
<option value="Jane||Doe">Jane Doe</option>
<option value="Mary Jane||Doe">Mary Jane Doe</option>
The third <option> tag is an example of why you can't rely on spaces to parse first and last name; a person can have double name or double last name -- or both, as it is in my case ;-)
The separator || is an arbitrary one, the idea is to use one or more characters that are not likely going to be used as part of the name or the last name.
This approach (which again, is a really bad one) would require you to parse the first name and last name individually afterwards, so your script would end up being:
<?php
$name = $_GET['fullname']; //'fullname' is the name of our <select>
$name = explode('||',$name); //this returns an array, with each position defined by the || token
//$name is now an array(0=>'John',1=>'Doe') - for example.
//Get the first name
$firstName = $name[0]; //John
//Get the last name
$lastName = $name[1]; //Doe
//Finally, your SQL would be updated to be:
$donate_sql = "UPDATE `donate` SET donate_Total= donate_Total + {$_GET['value']} WHERE first_Name = '$firstName' AND last_Name ='$lastName'";
mysql_query($donate_sql);
?>
Old answer
The quick answer is:
$donate_sql = "UPDATE `donate` SET donate_Total = donate_Total + {$_GET['value']} WHERE first_Name = 'first_Name' AND last_Name ='last_Name'";
And then using the mysql_query($donate_sql); function.
However as @hjpotter92 pointed out, you should (amongst other things) add an ID column to that table and set it as a primary key.
Also, you should keep in mind things like escaping values that come in your requests ($_POST and $_GET), so no SQL injection is applied to your query.
Hope this helps!
Cheers.