Re: [PHP] Re: Post variables and mysql queries

2003-10-27 Thread Eugene Lee
On Mon, Oct 27, 2003 at 09:38:32AM -0800, Justin Patrin wrote: : : $query='Select * from users where userid="'.$_POST['userid'].'"'; : : I tend to use single quotes whenever I can and to use concatenation : instead of using in-string variables. I do this for three reasons. The : first is effici

[PHP] Re: Post variables and mysql queries

2003-10-27 Thread Justin Patrin
$query='Select * from users where userid="'.$_POST['userid'].'"'; I tend to use single quotes whenever I can and to use concatenation instead of using in-string variables. I do this for three reasons. The first is efficiency. Strings surrounded by single chars are not parsed for any values, suc

[PHP] Re: Post variables and mysql queries

2003-10-27 Thread pete M
$query="Select * from users where userid='".$_POST['userid']."'"; ;-) pete Luis Lebron wrote: This may be a dumb question but here goes. I have been trying to use $_POST globals in sql queries. If I use the following query string it does not work $query="Select * from users where userid='$_POST

[PHP] Re: Post Variables

2002-12-05 Thread Mattia
> for ($i=0; $i<=12; $i++) > { > echo ""; > echo ""; > } the tag must stay out of the for loop. the syntax for is bye Mattia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: post variables to MySQL fields

2001-11-12 Thread Mike Harvey
This isn't the code you were talking about but it's something I wrote and use all the time. update_table() requires a "where" variable which is an array which needs to be declared before the function is called. The $where array is only 2 parts with the column name as [0] and the condition as [1].