So your saying i should be using POST rather than GET? "John W. Holmes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > PAUL FERRIE wrote: > > > I am not sure what the problem is here. The script runs and deletes the > > relevent row but still returns "DATA from albums loaded > > row id 658 did not get sent > > Error deleting row! > > Warning: Cannot modify header information - headers already sent by (output > > started at /home/pferrie/public_html/vinrev/adm/deleteid.php:2) in > > /home/pferrie/public_html/vinrev/adm/deleteid.php on line 21 > > You get this error because you echo display messages and errors before > trying to do a header() redirect. You can't have any output before header(). > > > " > > <? > > if (isset($_GET['tablename'])) { > > echo "DATA from <b>{$_GET['tablename']}</b> loaded<br>"; > > } else { > > echo "<i>$tablename</i> did not get sent<br>"; > > } > > if (isset($_GET['id'])) { > > Take a look at your form again, you're using POST. > if(isset($_POST['id'])) { > > > echo "row id= <b>{$_GET['id']}</b><br>"; > > } else { > > echo "row id <i>$id</i> did not get sent<br>"; > > But you must have register_globals still on because $id is set with the > same value as $_POST['id']... > > > } > > > > > > include("connection.php"); > > $query = mysql_query("DELETE FROM $tablename WHERE id= $id")or die("<br>ther > > and that's why this query works, because $id is the correct value. > > > was an error<br> tablename:= $tablename<br> > > row id:= $id"); > > if(!mysql_query($query)) { > > echo"Error deleting row!"); > > } > > Header("Location: delete.php?success=$success"); > > > > ?> > > > > > > I am php newbie and might be missing the obviuos > > Might be missing the obvious, too. ;) > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > php|architect: The Magazine for PHP Professionals – www.phparch.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php