TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 10-28-2009, 01:23 AM   #1 (permalink)
The Acquainted
 
Dave's Avatar
 
Join Date: Apr 2008
Posts: 110
Thanks: 97
Dave is on a distinguished road
Default $_POST: Are both approaches equally good?

Take a look at the code below regarding POST. Which is better?

PHP Code:
$sql "SELECT   teachername
               , statecourse
               , semester
               , meetingcode
               , last_name
               , first_name
          FROM 
$c_tblname
         WHERE teachername = \"
{$_POST['teachername']}\" and
               semester    = \"
{$_POST['semester']}\"    and
               meetingcode = \"
{$_POST['meetingcode']}\" ";

//------------------------------------------

extract ($_POST) ;
$sql "SELECT   teachername
               , statecourse
               , semester
               , meetingcode
               , last_name
               , first_name
          FROM 
$c_tblname
         WHERE teachername = '
$teachername' and
               semester    = '
$semester'    and
               meetingcode = '
$meetingcode' "
Thanks!
Dave is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML only good for RSS? Orc XML, XSLT, XPath, XQuery 12 10-19-2012 10:03 AM
i need some good ideas about my website webtuto General 4 03-14-2008 12:33 PM
Good business communication. Village Idiot The Lounge 10 01-11-2008 08:43 PM
Good 'n Fast thumbnail script?! marxx General 6 10-31-2007 11:22 AM
Good Evening obolus Member Introductions 4 10-07-2007 12:30 AM


All times are GMT. The time now is 10:25 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design