PHP Delete Confirmation Message

Aug 17, 2007

Is there a way in php to create a confirmation box when a user does something like delete a row from a database? I'm trying to get away w/o using javascript to pull this off, but I don't know if it's possible. Right now I've just got it set up to delete when the link is clicked, but I don't find that to be a safe enough practice considering how easy it would be to screw up.

View 7 Replies


Displaying An Update Confirmation Message

How is it possible to display, within a page, a short text message of my choosing to confirm that after selecting submit, the details have successfully been updated. This will need to be displayed on a useradmin page which confirms details from various tables including the users table and job history tables.

View 1 Replies

Applying Form Confirmation Message

Now, I have created a form, the problem is I cannot get the confirmation message to appear after the user has submitted the form.

This is the problem:

When I put the PHP code and the validation message in a separate PHP page it works perfectly, the problem with this method is I do-not know how to add the validation when the form script is in a separate page.

But when I add the script and the XHTML code on the same page, I can add the validation but the confirmation message appears when the form loads in the browser with the form - before the user has even submitted it.

How can I add confirmation message to this form after the user has submitted it?

Complete code without confirmation page.

$post = array("firstName" => "","lastName" => "","Email" => "","phoneNumber" => "","comments" => "");
$errors = $post;
if (isset($_POST["send"]))
foreach ($post as $k => $v)


View 6 Replies

Send An Email Confirmation Message

I am trying to get user's input on a form, send the form information to myself in an email, and then send the user and email to their inputted email address. This is the code I have, not sure what I'm doing wrong??!?!? Code:

View 12 Replies

Confirmation When Delete A Record

I want to add a confirmation before I delete a record. For example if the user wants to delete they press "Yes" otherwise "NO" and go back.


//delete user
$sSQL = "DELETE FROM user WHERE (`userid` = ".$_GET['record_id'].")";

$result = mysql_query($sSQL) or die(mysql_error());

echo "<h1> User deleted succesfully</h1><br>";


View 4 Replies

Confirmation Dialog Box For Delete

I am trying to implement a confirmation dialog box before deleting a record in a table that have. I created a MYSQL table called manager with columns:

Table manager

I use a while loop to display the records of every manager in the database a "delete this manager" link next to each record. If the user clicks the "delete this manager" a html form is called prompting the user if he wants indeed to delete that manager. If yes,I get the following error: Error deleting manager: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2 Here are extracts of my code(manager.php):

$result = @mysql_query('SELECT managerID,FirstName,LastName,Department FROM manager');
if (!$result) {


View 7 Replies

Modify Header Information - Don't Get Confirmation Message

I have a page (next) which pulls in some detail from a database, which are then made into active links, clicking on one brings up the complete record in a form (comletelist) so that it can be edited. Pressing the save button updates the record and then should redirect to the page (next)with the original list, giving a 'database updated' message and displaying the active links again.

The database is updating, but I don't get my confirmation message, only the error message below.

Warning: Cannot modify header information - headers already sent by (output started at /chroot/home/TM340484/public_html/blog/completelist.php:18) in /chroot/home/TM340484/public_html/blog/completelist.php on line 87

View 8 Replies

Html - Displaying A Confirmation Message After Doing A Query?

I am trying to call a function with Javascript, HTML, AJAX, and PHP.I am still new to Javascript, AJAX, and PHP.Background info: I am trying to add a new customer to my database but I am now trying to get a confirmation message on the same page without the page refreshing.

This is what I have:

<script type="text/javascript">
function addCustomer(ln,fn,pn,dob)
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();

What am I doing wrong? :) I do not want the page to refresh. I am trying to just get the confirmation or non-confirmation to display.

View 2 Replies

Display Form Confirmation Message In The Same Page?

I've seen this behaviour in many websites and web applications but I'm not able to find a "clean and standard" way to reproduce it: the user fills in the form, submits it and then, after a successful validation, the form is reloaded with a message on top saying something like "The item has been saved". No problems so far, what I can't understand is how they keep displaying the confirmation message if that specific page is reloaded, but when the user goes to another page and then returns to the original one (the one containing the form) the message is not there anymore. There seems to be no get or post data, so I'm assuming session variables or cookies are used instead, but how do they know when to keep and when to unset them? Or maybe I'm wrong and there is some other way..

View 2 Replies

Sending A Confirmation Message Automatically To A Given Email Id

I have a form which has a field for email id. When form is submitted then a confirmation message should be send automatically to the given email id, how?

View 1 Replies

Automatic Confirmation Before Delete Some Rows From The Database?

I need to do a Confirmation before delete some rows from the database. I think a alert box in javascript will do the job but I don't know how to start this...I hae a link like this:

Code: [Select]<a href="url">Remove</a>

How can I call the javascript code to deal with the Yes/No input from the user

View 7 Replies

Create A Delete Confirmation Box - Line 103 Is Showing Error?

im trying to create a delete confirmation box.This particular line is showing error as below :

Parse error: parse error, expecting `','' or `';'' in C:wampwwwi-documentsearch_admin.php on line 103

echo "<td><a href=" . $rows['url'] . ">" . $rows['url'] . "</a></td>";
echo "<td><a href=edit_doc.php?id=" . $rows['id'] . ">Edit</a></td>";
echo "<td><a href=delete.php?id=" . $rows['id'] ." onClick="return confirm('Are you sure you want to delete?');">Delete</a></td>";

View 2 Replies

Generating Confirmation Code For An Email Confirmation?

Using PHP, what are some ways to generate a random confirmation code that can be stored in a DB and be used for email confirmation? I can't for the life of me think of a way to generate a unique number that can be generated from a user's profile. That way I can use a function to make the number small enough to be included in the URL (see this link). Remember, the user has to click on the link to "confirm/activate" his/her account. If I can't use numbers, I have no problems using both letters and numbers.With that said, I've tried hashing the username along with a "salt" to generate the random code. I know there has to be a better way, so let's hear it.

View 2 Replies

Create A Function Where Users Can Check A Message To Delete?

I am trying to create a function where users can check a message to delete. Obviously if more than one message is checked, they will all be deleted.

I have the following code

<form action="process.php" method="post">
<input type="hidden" name="deleteMessages" />


I want to pass the checkbox through and if the value is 1, process it and delete it. But how would I achieve this with mulitple messages no matter if there is one message or ten?

View 3 Replies

The Message Isnt Sent And The Approval Message Failed Message Is Displayed?

First of all, this is not a mysql error.I got the following script which updates a mysql field before redirecting the script to another "page" to get the users information from the database and then sending an email to notify the user that their account has been approved.

However, the message isnt sent and the Approval Message Failed message is displayed.Here are both parts of the script although it is the second part which is failing.

Code: [Select]case "approval":


$mysqlPassword = (base64_decode($mysqlpword));[code]....

View 5 Replies

Sending A Text Message Via - Receiving Message Gives Out The Hosting Servers Name ?

I've been using a friends code to send an sms message via php. The only issue is that on receiving the message it gives out the hosting servers name. Now this I know can lead to a security issue. This code uses the mail function of PHP.The default sub is set to TestingText .Here is the general form:

<form id="sms" name="sms" method="post" action="send.php">
<table width="400">

View 1 Replies

Message System Like Hotmails Where The Message List Appears On The Left?

i am making a private messaging system like hotmails where the message list appears on the left. Then when you click on one of them the box on the right loads the email. The problem is i dont really know how to go about it.

View 4 Replies

Chat Concept : Enter Message Into Chatroom1 Table.Retrieve Messages Periodically By New Message Entered Organized By Timestamp?

Im thinking about taking on a chat room php based project.I want to make sure my logic is right though.



Sign up.php
Insert username and password into Username table.

Search Username table to validate username and password. Create session.

enter message into chatroom1 table.Retrieve messages periodically by new message entered organized by timestamp.

View 5 Replies

Retrieve A Specific Message From Imap With Consistent Id (message Id)

I need to keep a link tracking for an email message. I am using PHP and IMAP. I need some ID that identify the email over time. Using IMAP UID does not seems to work since the UID changes after expunge(), i know there is a message_id for emails, but how can i retrieve an email using it's message_id with PHP and IMAP?

Is there another identifier i can use?

View 1 Replies

Programmatically Getting POP3 Message Unique Id And Message Size

I need to access a POP3 email account and obtain the the list of messages' unique id and its corresponding file size. I'm using CodeIgniter and have access to Zend libraries. Trying to do something similar to the LIST command. Ideas?

View 1 Replies

Change The Color Of An Echo Message And Center The Message?

How do I change the color of an echo message and center the message in the PHP I've written. The line I have is:echo 'Request has been sent.

View 6 Replies

Delete Record - When The Delete Link Is Clicked The Next Page Is Blank And Nothing Is Deleted.

This is my "delete.php" and this "todo/delete.php?id=64" an example of a link to it generated from the index.php page. When the delete link is clicked the next page is blank and nothing is deleted. What have I done wrong?


@mysql_select_db($database) or die( "Unable to select database");

$id="delete from todo where id='$id'";


View 1 Replies

Doctrine Cascade:[delete] Does Not Call Delete() Method Of Related Objects?

using Doctrine 1.2 in my project.The schema.yml file contains:

tableName: campaign


I have defined CampaignImages::delete() method and put some debugging code there, but it does not get executed when Campaign::delete() is called.Isn't cascade:[delete] meant precisly for this reason?I don't want to use database level cascades, because image files associated with CampaignImage must be deleted when deleting record.

View 3 Replies

Use Unlink Function To Delete File During Update And Delete In Joomla?

I am able to upload file in joomla. I want to know if the user is updating images with another image like then the file already present and linked with user id should be replaced or deleted. In case of delete function should be removed.

$src = $file ['tmp_name'];
$dest = JPATH_COMPONENT . DS . "uploads" . DS . $newfilename;
JFile::upload ( $src, $dest );
// update the field greeting_pic //
$result = $model->updateGreetingPic ( $id, $newfilename );

I want to replace the uploaded image if present and replace it with the new one. How do I fetch the already uploaded image from the database (MySQL).

View 1 Replies

MySQL Delete Return / Check If Delete Was Successful?

Using PHP, I am trying to delete a record, but I want to check if it was successful or not. Is anything returned from a successful DELETE FROM foo where bar = 'stuff'?

Alternatively, do you know any other ways to check if a DELETE was successful? Or am I better off just making sure the row exists before I delete it? I am trying to avoid another query if possible.

View 3 Replies

Delete Row From Database / After 15 Days The Post Will Be Delete Automatically?

I had a real estate web site and user/visitor can post their property into the database. Now What I need is After 15 days the post will be delete automatically"How to do delete using Date ?"

View 4 Replies

Copyrights 2005-15, All rights reserved