Reply to Re: Sample of navigation bar (PHP & MySQL)

Your name:

Reply:


Posted by Stefan Rybacki on 10/11/05 22:50

Otto wrote:
> Hello Stefan
>
>
>><?php
>>
>>print('<a href="next.htm">next</a><a href="prev.htm">previous</a><a
>>href="new.htm">new</a><a href="delete.htm">delete</a>');
>>
>>?>
>>
> I don't have problem with this. I'm looking for a good sample with
> PHP & MySQL source for the mentioned buttons.
>
> I already did it for the new save and delete button but have some
> problem with next and previous. It would be nice if I could get all in
> one script!
>
> Someting like that:
>
> // new record
> if($mode == "new")
> {
> $query = "INSERT INTO ...";
> $req = mysql_query($query);
> $id = mysql_insert_id();
> }
>
> // save record
> if($mode == "save")
> {
> $id = $last_id;
> $query = "UPDATE ....
> $req = mysql_query($query);
> }
>
> // Delete record
> if($mode == "Delete")
> {
> $id = DeleteEnr($last_id, $famille);
> $query = "DELETE FROM adresse WHERE ID=$id";
> $req = mysql_query($query);
> }
>
>
> // Next record
> if($mode == "next")
> {
> }
>
> // Previous record
> if($mode == "previous")
> {
> }
>
>
> // Check passed ID
> if ($ID && !$id){$id = $ID;}
>
> // Query ID
> $query = "SELECT FROM .. WHERE ID=$id order by name";
> $req = mysql_query($query);
>
> // Form
> ?>
>
> Form top
> ..
> ..
> ..
> ..
> Form bottom
>
> Button on the bottom of the screen
>
> <input type='submit' name=mode value='next'>
> <input type='submit' name=mode value='previous'>
> <input type='submit' name=mode value='save'>
> <input type='submit' name=mode value='delete'>
> <input type=hidden name=last_id value='<?= $id ?>'>
>
> </form>
> </body></html>
>
>
> Do you think that's possible ?
>

Look at the following discussion, we had that already, maybe it helps you.

http://groups.google.com/group/alt.php.sql/browse_frm/thread/f86dacb1b139dfee/3f053fb2a6da0bd6
http://groups.google.com/group/alt.comp.lang.php/browse_frm/thread/5954625bd5704294/a5282c4333c7081a

Regards
Stefan

PS: it is obvious that my answer is more a joke than an decent answer, it came because of
your non saying question. You didn't provide any information of what you're trying to do.
So for future question please try to explain a bit what you're trying to achieve, not just
saying I want next, prev and delete buttons.


> Regards
>
> Otto
>

[Back to original 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

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