Re: [PHP] Re: PHP delete confirmation

2011-04-29 Thread Ashley Sheridan
"Jim Lucas"  wrote:

>On 4/29/2011 12:06 AM, Geoff Lane wrote:
>> On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote:
>>
>>> Personally I would use the javascript page navigation is senseless
>if they
>>> miss click.
>>
>>> Javascript: Small and simple javascript.
>>
>>> onclick="return confirm('Are you sure you want to delete?')"
>>
>> Personally, I'd use Javascript and also check that the form was
>> submitted after the client-side check. So something like a hidden
>> field ('jstest') in the client-side form that is set to 1 by the
>> onClick event prior to showing the confirmation box. Then in the
>> handling PHP:
>>
>> if ($_POST['jstest'] == 1){
>>   // the client called us via Javascript::confirm, so we know the
>>   // use really wants to delete
>> } else {
>>   // We weren't called via Javascript::confirm, so we need to
>>   // handle the confirmation in PHP
>> }
>>
>> HTH,
>>
>
>It wasn't a form, it was an HTML  tag
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

I sure hope that's behind something a search engine can't find, otherwise you 
could find yourself without a lot of things that it deleted as it follows all 
the links. I think I read a couple of things similar to this on daily wtf...



Thanks
Ash
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: PHP delete confirmation

2011-04-29 Thread Jim Lucas
On 4/29/2011 12:06 AM, Geoff Lane wrote:
> On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote:
> 
>> Personally I would use the javascript page navigation is senseless if they
>> miss click.
>  
>> Javascript: Small and simple javascript.
> 
>> onclick="return confirm('Are you sure you want to delete?')"
> 
> Personally, I'd use Javascript and also check that the form was
> submitted after the client-side check. So something like a hidden
> field ('jstest') in the client-side form that is set to 1 by the
> onClick event prior to showing the confirmation box. Then in the
> handling PHP:
> 
> if ($_POST['jstest'] == 1){
>   // the client called us via Javascript::confirm, so we know the
>   // use really wants to delete
> } else {
>   // We weren't called via Javascript::confirm, so we need to
>   // handle the confirmation in PHP
> }
> 
> HTH,
> 

It wasn't a form, it was an HTML  tag

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: PHP delete confirmation

2011-04-29 Thread Geoff Lane
On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote:

> Personally I would use the javascript page navigation is senseless if they
> miss click.
 
> Javascript: Small and simple javascript.

> onclick="return confirm('Are you sure you want to delete?')"

Personally, I'd use Javascript and also check that the form was
submitted after the client-side check. So something like a hidden
field ('jstest') in the client-side form that is set to 1 by the
onClick event prior to showing the confirmation box. Then in the
handling PHP:

if ($_POST['jstest'] == 1){
  // the client called us via Javascript::confirm, so we know the
  // use really wants to delete
} else {
  // We weren't called via Javascript::confirm, so we need to
  // handle the confirmation in PHP
}

HTH,

-- 
Geoff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP delete confirmation

2011-04-28 Thread Sharl.Jimh.Tsin
yes,i agree with you,Richard L. Buskirk. process by client-side
script,such as javascript is the best and convenient way.

Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)



2011/4/29  :
> This can be done in the delete.php file OR use javascript onClick to confirm
> the intent.
>
>
> Delete.php
>  If($_GET['confirm'] == "Yes")
> {
>        //Delete actions
> }else If($_GET['confirm'] == "No")
> {
>        //No Delete actions.
> }else{
> //display a delete confirmation and remember to carry required information
> like the value you passed for delete.
> }
> ?>
>
>
> Personally I would use the javascript page navigation is senseless if they
> miss click.
>
> Javascript: Small and simple javascript.
>
> onclick="return confirm('Are you sure you want to delete?')"
>
>
>
> Richard L. Buskirk
>
>
> -Original Message-
> From: Chris Stinemetz [mailto:chrisstinem...@gmail.com]
> Sent: Friday, April 29, 2011 12:33 AM
> To: php-general@lists.php.net
> Subject: [PHP] PHP delete confirmation
>
> I have been trying to figure out how to add delete confirmation for
> the bellow snippet of code. I would prefer not to use javascript. Can
> anyone offer any advise on how to right the delete confirmation in
> PHP?
>
> Thank you in advance.
>
> P.S. I apologize for the indention. For some reason gmail messes it up.
>
>        // loop through results of database query, displaying them in the
> table
>       while($row = mysql_fetch_array( $result )) {
>
>                // echo out the contents of each row into a table
>                   echo "";
>                   echo '' . $row['Name'] . '';
>                   echo '' . $row['Date'] . '';
>                   echo '' . $row['StoreInfo'] . '';
>                   echo '' . $row['Address'] . '';
>                   echo '' . $row['Type'] . '';
>                   echo '' . $row['EngTech'] . '';
>                   echo '' . $row['StoreManager'] . '';
>                   echo '' . $row['BBtime'] . '';
>                   echo '' . $row['BBup'] . '';
>                   echo '' . $row['BBdown'] . '';
>                   echo '' . $row['SiteSect'] . '';
>                   echo '' . $row['VoiceCall'] . '';
>                   echo '' . $row['Comments'] . '';
>                   echo 'Edit';
>                   echo 'Delete';
>                   echo "";
>       }
>
>       // close table>
>       echo "";
> ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP delete confirmation

2011-04-28 Thread admin
This can be done in the delete.php file OR use javascript onClick to confirm
the intent.


Delete.php



Personally I would use the javascript page navigation is senseless if they
miss click.
 
Javascript: Small and simple javascript.

onclick="return confirm('Are you sure you want to delete?')"



Richard L. Buskirk


-Original Message-
From: Chris Stinemetz [mailto:chrisstinem...@gmail.com] 
Sent: Friday, April 29, 2011 12:33 AM
To: php-general@lists.php.net
Subject: [PHP] PHP delete confirmation

I have been trying to figure out how to add delete confirmation for
the bellow snippet of code. I would prefer not to use javascript. Can
anyone offer any advise on how to right the delete confirmation in
PHP?

Thank you in advance.

P.S. I apologize for the indention. For some reason gmail messes it up.

";
   echo '' . $row['Name'] . '';
   echo '' . $row['Date'] . '';
   echo '' . $row['StoreInfo'] . '';
   echo '' . $row['Address'] . '';
   echo '' . $row['Type'] . '';
   echo '' . $row['EngTech'] . '';
   echo '' . $row['StoreManager'] . '';
   echo '' . $row['BBtime'] . '';
   echo '' . $row['BBup'] . '';
   echo '' . $row['BBdown'] . '';
   echo '' . $row['SiteSect'] . '';
   echo '' . $row['VoiceCall'] . '';
   echo '' . $row['Comments'] . '';
   echo 'Edit';
   echo 'Delete';
   echo "";
   }

   // close table>
   echo "";
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP delete confirmation

2011-04-28 Thread Chris Stinemetz
I have been trying to figure out how to add delete confirmation for
the bellow snippet of code. I would prefer not to use javascript. Can
anyone offer any advise on how to right the delete confirmation in
PHP?

Thank you in advance.

P.S. I apologize for the indention. For some reason gmail messes it up.

";
   echo '' . $row['Name'] . '';
   echo '' . $row['Date'] . '';
   echo '' . $row['StoreInfo'] . '';
   echo '' . $row['Address'] . '';
   echo '' . $row['Type'] . '';
   echo '' . $row['EngTech'] . '';
   echo '' . $row['StoreManager'] . '';
   echo '' . $row['BBtime'] . '';
   echo '' . $row['BBup'] . '';
   echo '' . $row['BBdown'] . '';
   echo '' . $row['SiteSect'] . '';
   echo '' . $row['VoiceCall'] . '';
   echo '' . $row['Comments'] . '';
   echo 'Edit';
   echo 'Delete';
   echo "";
   }

   // close table>
   echo "";
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Delete Confirmation

2002-03-19 Thread Daniel Negron/KBE


Does this code go above the  delete statement ?or is it added to the delete
statement.

is deleteuser part of the script or do I replace it with my db name.  I'm
alittle slow with php and mysql.  TIA for your patience.

thanx
**DAN**


   
  
"SHEETS,JASON  
  
(Non-HP-Boise,e   To: 'Daniel Negron/KBE' 
<[EMAIL PROTECTED]>   
x1)"  cc:  
  
 
  
   
  
03/19/2002 
  
05:20 PM   
  
   
  
   
  




I have done this, the way I have done it is to have two variables you look
for

for example



the deluserconfirmbox would display html something to the effect of





Confirm Delete User
 No    Yes





Basically what this does is trap the delete command and throw a form in the
middle, if they select yes it sets another value and then the script
deletes
the user.

Jason

-Original Message-
From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 2:49 PM
To: SHEETS,JASON (Non-HP-Boise,ex1)
Subject: RE: [PHP] Delete Confirmation



Actually I can delete items fine, but I am trying to get an input box to
pop up and ask "confirm record deletion by typing 'yes' "
then going to the inital delete page and confirming deletion.  The way I
have it now, you click on delete and its gone no warning no nothin.
Thanx for your response.




|+->
||  "SHEETS,JASON  |
||  (Non-HP-Boise,e|
||  x1)"   |
||   |
|| |
||  03/19/02 04:03 |
||  PM |
|| |
|+->

>
---
--|
  |
|
  |  To: 'Daniel Negron/KBE' <[EMAIL PROTECTED]>
|
  |  cc:
|
  |  Subject: RE: [PHP] Delete Confirmation
|

>
---
--|




I'm not exactly sure what you are asking for, if you are asking how to
delete records from a database through PHP just pass the SQL delete command
to the database just like any other query.



Jason

-Original Message-
From: Daniel Negron/KBE [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 1:54 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Delete Confirmation


Does anyone have examples of record deletions from php to mysql?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Delete Confirmation

2002-03-19 Thread Daniel Negron/KBE

Does anyone have examples of record deletions from php to mysql?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php