note 80172 added to function.odbc-exec
| From: | wcwjwd at spamlessyahoodotcomspamfreee | Date: | Wed, 02 Jan 2008 20:48:33 +0000 |
| Subject: | note 80172 added to function.odbc-exec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-134665@lists.php.net to get a copy of this message | ||
I have an include that houses functions which run sql, and I have a form that relies on the values
in that sql server. For example:
//My include, x.inc
<?php
function RemoveSomething($a)
{
odbc_execute($con, "DELETE * FROM tTable WHERE (FieldID = $a);
return "Deleted.";
}
?>
//My index.php
<?php
include "x.inc";
if (isset($_POST['a']))
$return = RemoveSomething($_POST['a']);
?>
<form>
<select>
<?php
DrawDropdownBoxOfDataFromtTable();
?>
</select>
</form>
and it draws the whole list, including what should be deleted. If I reload the page (without
resending POST data), the record IS deleted, as expected and reported. It's also reflected in
the SQL database. However, on the page, when it loads, DrawDropdownBoxOfDataFromtTable still shows
the record that is being deleted. Any help would be great.
----
Server IP: 209.41.74.194
Probable Submitter: 70.168.37.216
----
Manual Page -- http://www.php.net/manual/en/function.odbc-exec.php
Edit -- https://master.php.net/note/edit/80172
Del: integrated -- https://master.php.net/note/delete/80172/integrated
Del: useless -- https://master.php.net/note/delete/80172/useless
Del: bad code -- https://master.php.net/note/delete/80172/bad+code
Del: spam -- https://master.php.net/note/delete/80172/spam
Del: non-english -- https://master.php.net/note/delete/80172/non-english
Del: in docs -- https://master.php.net/note/delete/80172/in+docs
Del: other reasons-- https://master.php.net/note/delete/80172
Reject -- https://master.php.net/note/reject/80172
Search -- https://master.php.net/manage/user-notes.php