Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0
This is the forum to discuss the Wrox book Beginning PHP5, Apache, and MySQL Web Development by Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz, Michael K. Glass; ISBN: 9780764579660
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 29th, 2005, 08:50 PM
Registered User
 
Join Date: Mar 2005
Location: Fort Myers, FL, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Explain some code on p178

Most of the code in this book so far is very well explained but I have hit a roadblock on p178 (I get a little lost with the do's and the sequence in delete.php)

if ( !isset( $_GET['do'] ) || $_GET['do'] != 1 ){
?>
      <p align="center" style="color:#FF0000">
         Are you sure you want to delete this <?php echo $_GET['type']?>?<br/>
         <a href="<?php echo $_SERVER['REQUEST_URI']?>&do=1">yes</a> or <a
href="index.php">Index</a>


I understand conceptually what is going on here but I can't create a variation of it since I do not understand why the href approval takes pace after the !isset???
Reply With Quote
  #2 (permalink)  
Old June 3rd, 2005, 09:51 PM
Authorized User
 
Join Date: Jun 2004
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's checking to see if the $_GET query string variable "do" is set. If not, It's displaying a link to either delete the item, or return to the index. Notice in the href attribute of the link, "do" is set to 1. If you clicked on the link and it posted back to this page, the link choice would not display again, because do would be set, and its value would be 1.

In other words, the isset() function and comparison to 1 wrap the link, to only show it when needed.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone explain this code to me pandu345 Java Basics 2 October 6th, 2006 12:25 PM
could any one explain this code for me ? method Access VBA 1 August 13th, 2005 02:02 AM
explain please rein Javascript 3 January 31st, 2005 08:47 AM
Please explain this code : p131 top para ababb BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 January 28th, 2005 05:02 PM
Could somebody explain this to me, please? czambran BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 June 7th, 2004 04:05 PM



All times are GMT -4. The time now is 06:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.