You are here: Re: Help with $_POST and $_SERVER['PHP_SELF'] please. « PHP Programming Language « IT news, forums, messages
Re: Help with $_POST and $_SERVER['PHP_SELF'] please.

Posted by Ben Holness on 05/20/06 05:37

Dynamos comments are totally valid, but on the basis that you stripped all
that stuff out, you just need to add a hidden input here to make it work...

(Note: Example typed and not tested)

> <?php
> $delete = '( id = ' . implode(' OR id = ', $_POST['delete'] ) . ' ) ';
> if (!isset($_POST['submit']))
> {
> // Then display the records that were marked for deletion ?>
> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">

** Hidden input here **
<input type="hidden" name="delete" value="<?php echo $_POST['delete']; ?>">

> <p> align="center"><font face="Arial" size="2"><b>Are you sure you wish to
> continue?</b></font></p>
> <p align="center"><input type="submit" name="submit" value="Yes I want
> to delete these records"></p>
> </form>

[snip]


Cheers,

Ben

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация