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.
<?php
//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 Complete Forum Thread with Replies
Related Forum Messages:
PHP Delete Confirmation Message
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 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? <? include("dbinfo.inc.php"); mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $id="delete from todo where id='$id'"; mysql_query($id); mysql_close(); ?>
View Replies !
Delete Record
i have this code for my site that will connect to my database and grab all my members there id email and ip the problem is that it dont have a button where you can select a member and delete that member can anyone help me with this?i want to add a button and a check box so if i check off a member and click a delete button it will delete that member here is the code:
View Replies !
Delete Record!
I am using PHP5 , MySQL5, Apache 2 My Database was created with phpmyAdmin.Then I inserted with script and phpmyAdmin data into the Database. Now I am Unable to empty or delete or remove any fields out of the Database. Neither a script ot phpmyAdmin can delete.What has blocked the database? I have restarted my pc, Still I am unable to remove anything.
View Replies !
Delete Record And Files
I have a code that uploads images along with some info into a directory and database, this all works fine. I can delete the record but the images relevent to that record continue to exsist in my images directory. How would i set up a php code to delete a file in ../images when the record of its name is stored in a column in my database. Here is my delete record code:
View Replies !
Mysql Delete Record
when I run this code below it doesn't delete the record or display any error message $id = $_GET['id']; include("../dbconnect.php"); mysql_query("DELETE FROM promotions WHERE id='$id'") or die(mysql_error()); Such a simple thing to do but I don't no why it doesn't work
View Replies !
Unable To Delete A Record Using Php
I am having a form which displays a couple of values from database and a delete button which is used to delete that particular record. Below is the code that I am using, but I am unable to delete the record. Please help me to get the record deleted. Code:
View Replies !
Delete Record - You Have An Error In Your SQL Syntax;
Im some having trouble with deleting a record, surely it isnt that hard, dont know what im doing wrong. this is the error i am gettin: 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 '` WHERE id=1' at line 1Here is my delete code:
View Replies !
Delete Record If Older Than 5 Minutes?
Can someone help me in writing a query command, to delete a record, if the last_update field on a record is older than 5 minutes? My table has a last_update field, which holds a value as this for example: 2007-04-08 01:33:12 I need a query that when I access a php file, if a record is older than 5 minutes, it will delete it.
View Replies !
Click Link To Delete Record
I am trying to add a function to one of my scripts. I would like to be able to click a link and have it delete a particular row from by DB. Links are generated by a PHP script and are based on entries on a DB. In this DB I have a column called 'users'. The table is generated by the following snippet: Code:
View Replies !
Dreamweaver Generated Code To Delete Record
I use the dreamweaver generated code to delete a record, how would i add some code to it to delete the files (images) stored in my../images folder, that are linked to the record being deleted, there field names are photo1, photo2, ect..... and there image names are stored in the database Code:
View Replies !
Auto Delete Record/Send Email After X Hours
What I have is a MySQL database which stores records that each have a date stamp on them (2 of them - one for record created date and one for record last updated date), what I want to do is try and have it so that records that haven't been updated in say 72 hours are automatically removed from the database, or the record is updated to set a flag as being out of date, or an email is sent to alert a user of the out of date record etc. I can easily write the script with the SQL query to check the records by the datestamp and perform the actions needed if the records are out of date, however that requires someone to physically visit that page to run the script and clean up the out dated records. What I want to try and do is have this happen automatically on its own without someone needing to actually visit the page to run the script. A good example is on eBay how emails are sent to you to let you know when your auctions are about to expire, i wouldnt imagine that eBay would rely on people visiting their website to make those queries run on the database so there must be a way of doing some automated script executio or having a scheduled task run on the server to have a PHP script run each day at midnight or something? Anyone know how to do this?
View Replies !
Script Repeat Updates The Record And Also Inserts Another Record With The Same Information.
I have a form which contains some fields that are populated with data from a table. This same form also has fields that are empty because the data has not been collected yet. The main table is called client with a primary key of client_id. What I need to do with this form is select the client and update the record into a new table with the missing information. If the client doesn't not exist in this second table, I need to insert the row otherwise if the client does exist in this table because of a previous update, update the record. When I run my script, the insert works. When I try to run the script again and try to update the record, the script not only updates the record but also inserts another record with the same information. How can I write my script so it checks whether a client exists in a table and if it does, update the record and if the client does not exist in the table, add the client?
View Replies !
Compare Record With Session Variable And Update Record If Different
I'm trying to figure out how to create a session variable from a recordset field value in a mySQL database and compare this with subsequent values from the same field each time the page reloads. When the value of the field changes (as a result of a user update) I want to trigger an event (redirecting to another page). It's probably a very basic PHP function but I am a newbie with this language.
View Replies !
Mysql Delete - $query = Mysql_query("DELETE
how would i do the following ? $query = mysql_query("DELETE notes, datestamp, abs_value, ID FROM absence_mgt WHERE datestamp='$date' AND ID='$vtc_login' ") or die(mysql_error()); im just getting "Unknown table 'notes' in MULTI DELETE" ?
View Replies !
URL Confirmation
I have been to this group for a couple of days. I am really impressed by the way people respond. I get answers for all my doubts and that too more info. So I am putting across a doubt that i hav During registering in some website we are forced to give our valid email id. Also they send a mail and a url is given , when we click that our registration is confirmed.
View Replies !
Hash Confirmation
I found an open source mailing list script which I am changing around a bit. I have set it up so that when they type in their email it stores their email on a flatfile database as their email and hash with two pipes. Like so: email¦¦efonasdgo8sehg0k They are sent a link for confirmation. The link contains the md5 code under variable "id". Now the subscribe page looks kinda like this: <?php $tmpinfo = file("tmp.txt"); $emailhash = $_GET["id"]; $emailemail = $_GET["email"]; foreach($tmpinfo as $key => $val) { $data[$key] = explode("¦¦", $val); } for($k = 0; $k < sizeof($tmpinfo); $k++) { $tmpemailfrontflatfile[$k][0]; $tmphashfromflatfile[$k][1]; } $tmpemail = $tmpemailfromflatfile; $tmphash = $tmphashfromflatfile; if (($_GET["action"] == "add")&&($tmphash == $emailhash)) { $fp = fopen("subscribers.txt", "r"); $file_text = fread($fp, 999999); fclose($fp); $subscribers = explode(",",$file_text); foreach($subscribers as $subscriber) { if($subscriber == $_GET["email"]) { $result = 1; break; } else { $result = 0; } } if($result == 1) { $msg = "<h3>Sorry, we cannot add you as... you already exist on this list...</h3>"; } else { $fp = fopen("newsletter/data/subscribers.txt", "a+"); fwrite($fp, $_GET["email"] . ","); fclose($fp); $msg = "<h3>You have been added to the newsletter. Thanks!</h3>"; } } else { die ('no'); } $page="about"; include ("inc/files/header.php");?> <!-- content --> <div id="content"><?php echo "$msg";?></div> <!-- // content --> <?php include ("inc/files/footer.php");?> The problem is that I am not sure it is looking up the email id and the tmp.txt id to match it. If it is, then it appears it doesn't do anything if they don't. What I am aiming for is that if the email id hash is the same as the one stored for that particular email (under tmp.txt) tnen it adds them to the subscribers.txt file, otherwise it comes up with an error.
View Replies !
Confirmation Page
I have a form that a user fills out. They hit the submit button. It takes them to a confirmation page. I want a html email sent to me with the data in it. Here is the code for that: Code:
View Replies !
Confirmation Form
I have a php script that allows a user to delete db entries in mysql. I want to add a "confirm delete" page before the query is executed. Maybe a quick page that says "are you sure you want to delete ($record) from ($db)? or something like that.
View Replies !
Password Confirmation....
I am trying to make a kind of members area, where a form is used to sign in. The username from the form is searched for in the users database, and then I want to confirm that the password from the form is the same as the password in the database before allowing the user to continue. At the moment people can login using any password - which aint good! Here is the code that should block this from happening (but it doesn't): PHP Code:
View Replies !
Confirmation Email
how to check if the e-mail adress is written in the right way in the form as www@www.www and if it is not to send an popup message to the user,
View Replies !
Password Confirmation
I have a registration script and i'd like to add a confirm password field. I added the field but i'm not sure where & how to add the Password=password2 code as a have quite a few else statements. I would like to redirect the user to another page if the 2 passwords do not match. If possible i would like to also unhide a layer containing a green checkmark aside of the password confirm box (if they match) as soon as the confirm password is entered. Dont know if thats possible. Code:
View Replies !
Logout Confirmation
i have the following code that enables a user to be logged out. This works perfectly however i now wish a confirmation dialog to appear asking to user to confirm thier actions but how do I do this in this code: <?php session_start(); session_destroy(); $logout = "login.php"; header("Location: $logout"); ?>
View Replies !
Email Confirmation
I am hoping someone can point me in the right direction. I am trying to set up a registration form. Currently, when submitted, the form writes the user's info to a database and sends out an email with thier registration details. I want the user to confirm thier registration details while also confirming that their email exists by clicking on a link that is sent in the confirmation email. How do I generate that link? Is it called "hashing"? Furthermore, once I figure out how to generate that link should I have my database set up with two tables? One for "unconfirmed" users and one for users that have "confirmed" through email. Should the link in the email write the users details to the "confirmed" table in the database?
View Replies !
Confirmation Redirect
I recently posted regarding problems we're experiencing when displaying confirmation messages after a database event (say an UPDATE or INSERT), where if the visitor sits on their page and refreshes, we end up with duplicate or blank entries, or if the back button is used and they click OK to post data. Any how, there were many responses (thank you) but I think the simple method we're going to use rather than trying to delve into session variables and comparing those (which is going to confuse me!) I have chosen to try the following. On every confirmation message, similar when logging into these Forums, it will show the displayed message for 10 seconds, and then automatically take the user back to another page which should hopefuly eliminate 95% of our problems. The point of my post is to ask how the best way of doing this is? Javascript, or PHP? As not every page is going to have a redirect and each redirect will take the visitor to another place, I need it to work within <body> (it's not ideal for anything to be in <head>).
View Replies !
Confirmation Of Input!
So I have a user which types his data into the form, presses OK and on the second page he gets a display of his data and a chance to process it into the database or to alter it so that those informations are again loaded into the form where he can make all the neccessary changes. How do I load the data into the form again where the user can change it.
View Replies !
Confirmation Number
I am trying to build a confirmation number system/ordering system that takes user input and loads it into a database. I have built the ordering system already and that is fully functinal, but I am trying to decide the best way to build a confirmation number system that is tied to the ordering system, handing out confirmation number's when a customer places an order. Additionally, I want this confirmation number loaded into the database for future reference.
View Replies !
E-mail Confirmation
Is it possable to send a confirmation e-mail to 2 adresses once a record has been added in mysql? I'm sure there is, but have no idea where to begin.
View Replies !
Email Confirmation Page
I have an email form on one of my web sites. When the user submits an email, it is automatically sent to me. Then the user sees a "confirmation" screen saying that the email has been sent. It says: Your message has been sent. We will reply to you at "user@blank.com" as soon as possible. Thanks "User Name". The words in quotes are just the user's email and name taken from the email form they just filled out. This is just done with a simple echo command. To me, it looks funny for the site to say Thanks followed by the user's first and last name. The text would read much more naturally if it just said Thanks followed by the first name. Does anyone know how to only display the first word entered in a form field, ignoring any words after a space, with an echo command or any other way?
View Replies !
Confirmation Of Mail Read
i'm having a problem of mail confirmation issues. If i send some Mime mail from my PHP script using mail () ; function, can i have a automated machanism with which i'll come to know whether the user has read my email. I don't want to make him click anyway in the email , it will just send me the auto-responce when he reads the mail. (i'm assuming, my client has html complient email)
View Replies !
Auto Emailer Confirmation
I put some php scripts on my website , for registrations , everything works fine , it adds users to the mysql database all good, but it never sends the email to the user so they can confirm there registration and get there password, Code:
View Replies !
Security Code Confirmation
I have a PHP script for link indexing directory, and submitting URLs to the directory is opened for public and it is just a form where the user need to add the URL, Site Name, and Description. I can see that some ROBO's are spamming my submit by many submits from irrelevant categories. How can I implement a "Security Code Confirmation" field with a image combination, meaning only human can see that random image that shows numbers and enter in that filed, so the system will compare it and accept it?
View Replies !
Email Read Confirmation
i have a free account wiht yahoo, but it does not offer me email confirmation. i need to send out some material that i would like to know if has been read. is there any way i can do this using php and hmtl. yahoo does support html.
View Replies !
Confirmation UPDATE Data
I made a simple script where users can change their username and password. When they click submit the data will be changed. It gives me a confirmation that it has been updated but it doesn't! Here's the code: <?php include('config2.php'); $nusername = $_POST['username']; $npassword = $_POST['password']; $id = $_REQUEST['id']; $sql = mysql_query("UPDATE painlessdesigns_users SET username='$nusername',password='$npassword' WHERE id='$id'") or die(mysql_error()); echo "Page has been successfully changed! Please <a href='login.php'>log in</a> with your new user details "; mysql_close(); ....
View Replies !
Confirmation Codes For Forms
I know you get CAPTCHA images for forms, to tell humans and bots apart. But the question that I have is whether or not this has to be an image? The method that I am using at the moment (my site is not yet live), is this: - I create a random number between 1 and 10000 - I then md5 this number to create a random md5 hash - I then pull out 6 characters from round about the middle of the hash - I convert these 6 characters to uppercase, and display them; providing an input box in which the user can enter the code. Obviously, after that, if the code is correct, the form executes. If not, it displays an error message.
View Replies !
Confirmation Screen With A Form
Ok I have a form where users will enter about 4 fields. When they hit submit they go to a confirmation screen using Your Email - <?php echo $_POST["email"];?> type lines to show what the user entered. I want them to then be able to hit submit again to email the results. My problem is that it seems when i use the echo to get to the confirmation screen i can't then use it again to get the information to mail.
View Replies !
Password Confirmation Problem
I've been making a code which does the following. The user fills out a form (and is added to the database- this works fine). Then on a new screen they again have to enter the e-mail address. What I want the code to do is take that e-mail address, check the database for a match(there should be one if the form was correctly filled out) and then send them a confirmation e-mail that has their password in it (which they also entered in the form. Code:
View Replies !
Create A Javascript Confirmation Box
I am trying to create a javascript confirmation box that will display various warning that let users know which fields that have left blank and allows them to decide if they want to continue and submit the form or go back and fill in the blank fields. I used php variables for the warnings. For example, if the zip field is blank, a php variable $zipwarn is given a value. If the zip field has a value, $zipwarn is null. The same goes for all of the other fields that are not mandatory. I only want the javascript to display variables that have value. If there is a better way than javascript confirm box to do this, I am open to suggestions.
View Replies !
Java Form Confirmation
I know how to do form validation with java, but how do I get a message to pop up asking: "Are you sure you want to submit?" with a "yes" and "no" button? I did some searching but only find form validation, and lots of other confusing Java script.
View Replies !
Error With Confirmation Of Email
Here's my code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <td><form name="form1" method="post" action="signup_ac.php"> Â <table align="center"> Â Â <tr valign="baseline"> Â Â Â <td nowrap align="right">Name:</td> Â Â Â <td><input type="text" name="name" value="" size="32"></td> Â Â </tr>......
View Replies !
Make A Confirmation Page In Dreamweaver MX
Ive set it up so ppl can input from a form. But when they hit submit , i get the form, but they get no way of knowing it was actually sent, resulting in multiples of the same thind sent 5 times and a followup email asking if I got it. How can I make a confirmation page in Dreamweaver MX My pages currently use MySQL dtabases in php pages.
View 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 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 Replies !
Confirmation On This Code For A Dynamic Signature
I have tweeked this code I found from online tutorials, though I am limited in my knowledge of PHP and unable to test this myself as apparently Apache is required and my server package (WinPro) uses IIS. However, I am making this for an Admin for a site that does use Apache, I just won’t be able to test anything myself, if I have errors in this code it would be outstanding if a PHP coder could please advise me of them along with the best method of operation, (if anybody is willing to do so.) I may not have understood everything fully, as this is the first time that I have actually played around with PHP code, as I myself am working on learning HTML, CSS, JS, and SQL at this time. Code:
View Replies !
|