Re: [PHP] Select and $_POST

2005-11-09 Thread Terence
Ross wrote: What is the correct syntax for $query = SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'; Thought this would work. R. Search for SQL Injection and see why what you're doing is very dangerous. Google is your friend. -- PHP General Mailing

Re: [PHP] Select and $_POST

2005-11-09 Thread Chris Shiflett
Ross wrote: $query = SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'; You have to use curly braces in order to interpolate an array: $string = ...{$array['foo']} ...; By the way, my favorite username is this: chris' -- That's what all my friends call me.

Re: [PHP] Select and $_POST

2005-11-09 Thread Curt Zirzow
On Wed, Nov 09, 2005 at 11:21:36PM -, Ross wrote: What is the correct syntax for $query = SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'; ?php if (get_magic_quotes_gpc()) { $_POST['username'] = stripslashes($_POST['username']); $_POST['pass']

Re: [PHP] select * from...

2005-08-09 Thread tg-php
Sounds like you want to do an inner(?) join on the two tables. This will show you where you have matches between the two tables but also show you the items that don't match (no special instructions). If I understand right, you have an order_id in both orders and special_orders_instructions

Re: [PHP] select statement

2005-05-08 Thread Andy Pieters
On Thursday 05 May 2005 10:10, Anasta wrote: Why doesnt this work, it shows the username but not the balance of the users money.here is the mysql table: ?php session_start(); include(connect.php); $uname=$_SESSION['username']; $user_balance=mysql_query($sql); $sql = Select FROM users

Re: [PHP] select statement

2005-05-08 Thread Josip Dzolonga
On , 2005-05-08 at 23:16 +0200, Andy Pieters wrote: Notes: * just because it comes from SESSION doesn't mean that it cannot be spoofed. That's why you should escape uname before including it in a query. Is there something I do not know ? :). As far as I know, it can be spoofed only if you

Re: [PHP] select statement

2005-05-08 Thread Richard Lynch
On Sun, May 8, 2005 3:20 pm, Josip Dzolonga said: On нед, 2005-05-08 at 23:16 +0200, Andy Pieters wrote: Notes: * just because it comes from SESSION doesn't mean that it cannot be spoofed. That's why you should escape uname before including it in a query. Is there something I do not know ?

Re: [PHP] select statement

2005-05-05 Thread bala chandar
On 5/5/05, Anasta [EMAIL PROTECTED] wrote: Why doesnt this work, it shows the username but not the balance of the users money.here is the mysql table: CREATE TABLE `users` ( `user_id` int(11) NOT NULL auto_increment, `username` varchar(15) NOT NULL default '', `password` varchar(15)

Re: [PHP] select statement

2005-05-05 Thread Prathaban Mookiah
Maybe the query should be select user_balance FROM users WHERE user_id=$uname; Prathap -- Original Message --- From: Anasta [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thu, 5 May 2005 16:10:35 +0800 Subject: [PHP] select statement Why doesnt this work, it shows the

Re: [PHP] select several files and download them simultaneous

2005-04-06 Thread Richard Lynch
On Wed, April 6, 2005 1:29 am, Thomas Franz said: is there a way to download a set of files at once, without zipping them. No, not really. I want to offer my visitors to select several files for download. Now i don't know how i can handle the download at once. I guess you *COULD* do

Re: [PHP] SELECT problem..Need urgent help !!!!

2004-11-29 Thread Greg Donald
On Mon, 29 Nov 2004 17:27:26 +0200, Phpu [EMAIL PROTECTED] wrote: I have an array named $ex_array. I want to search the database and find those ids that are different from the values in $ex_array. I use this but didn't work $sql = SELECT product_id FROM products WHERE product_id

RE: [PHP] Select List PHP,HTML

2004-08-23 Thread Jay Blanchard
[snip] I have been able to create a list with no problem, but now I need to get the value of which item is selected in the list. I looked around, but couldn't find anywhere that would let me do this. Here's my code to build the list. SELECT name=Company List multiple size=8 ?php

Re: [PHP] Select List PHP,HTML

2004-08-23 Thread Chuck
Thanks a lot, that worked perfectly. Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I have been able to create a list with no problem, but now I need to get the value of which item is selected in the list. I looked around, but couldn't find anywhere that would let

Re: [PHP] select from db

2004-06-04 Thread Robert Sossomon
!SNIP table name 'Selections' (rows) RoundGameName Winner Points data eg 1 1mark Hawthorn 4 (if team is a winner then 4 points added) 1 2mark Geelong 0 ! End Snip

Re: [PHP] select from db

2004-06-04 Thread Dennis Seavers
: Robert Sossomon [EMAIL PROTECTED] To: BigMark [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Date: 06/03/2004 11:44:58 PM Subject: Re: [PHP] select from db !SNIP table name 'Selections' (rows) RoundGameName Winner Points data eg 1 1

Re: [PHP] select from db

2004-06-04 Thread Dennis Seavers
for the confusion. [Original Message] From: Dennis Seavers [EMAIL PROTECTED] To: Robert Sossomon [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Date: 06/04/2004 12:00:39 AM Subject: Re: [PHP] select from db When you run this script, or one like it, does it work? You seem to be missing a number of brackets

Re: [PHP] SELECT

2004-06-02 Thread John W. Holmes
Phpu wrote: Is there any way to select all entries in the database except one entry or tho entries? Yes. http://www.bigredspark.com/answers.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP

RE: [PHP] Select box

2004-05-18 Thread Ford, Mike [LSS]
On 18 May 2004 09:06, Brent Clark wrote: Hi all For the likes of me I cant seem to figure out how to have a select drop down box , and have it so, that when I click the submit button, the page displays the correct content (which is what it does) but at the same time I need the select

Re: [PHP] Select from 24 tables

2004-05-01 Thread John Nichel
Dave Carrera wrote: Hi List, How do I select data from 24 table in my database. Each one is identical in structure layout being Id,name,list I want to select where like $_POST[var] from a form all of the tables but I am having trouble :( I thought making a var string like $string =

Re: [PHP] Select from 24 tables

2004-05-01 Thread John W. Holmes
Dave Carrera wrote: Hi List, How do I select data from 24 table in my database. Each one is identical in structure layout being Id,name,list The first thing you need to do is reorganize your database schema and put all of this into one table. You can see what a pain it is having 24 similar

Re: [PHP] Select from 24 tables

2004-05-01 Thread John Nichel
John W. Holmes wrote: Dave Carrera wrote: Hi List, How do I select data from 24 table in my database. Each one is identical in structure layout being Id,name,list The first thing you need to do is reorganize your database schema and put all of this into one table. You can see what a pain it

Re: [PHP] Select from 24 tables

2004-05-01 Thread Travis Low
This isn't always desirable, or even possible. I once designed a database to hold characteristics for a series of 70 different tests. There were about 50 different characteristics used in various combinations for each test. Each characteristic could be one of many values. So the

Re: [PHP] Select from 24 tables

2004-05-01 Thread Michal Migurski
This isn't always desirable, or even possible. I once designed a database to hold characteristics for a series of 70 different tests. There were about 50 different characteristics used in various combinations for each test. Each characteristic could be one of many values. So the

Re: [PHP] Select from 24 tables

2004-05-01 Thread Travis Low
Michal Migurski wrote: In my experience, it's usually a safe assumption that if you have a bunch of tables all structured identically and used in similar ways, you should probably merge them all into a single table with an extra column that corresponds to whatever differentiating characteristic

Re: [PHP] Select from 24 tables

2004-05-01 Thread Michal Migurski
Up what creek? You didn't really provide any technical justification for your suggestion. Up the creek of having to call for help on php-general because you have 24 identical tables you need to join, having never performed a join before. The pain only occurs when writing the SQL statements

Re: [PHP] Select from 24 tables

2004-05-01 Thread Travis Low
Hi Michal, Getting back to the original posting, I'm basically saying that I don't think it's a good idea to structure or restructure a database for the sake of simplifying a few SQL statements. Especially if the data being joined is in separate tables for a good reason. Regarding optimizing

Re: [PHP] Select from 24 tables

2004-05-01 Thread Curt Zirzow
* Thus wrote Travis Low ([EMAIL PROTECTED]): Hi Michal, Getting back to the original posting, I'm basically saying that I don't think it's a good idea to structure or restructure a database for the sake of simplifying a few SQL statements. Especially if the data being joined is in

Re: [PHP] Select Query problem

2003-10-06 Thread David Otton
On Mon, 6 Oct 2003 14:22:59 +0800, you wrote: Now my question is: What if I would like to display data for the CURRENT MONTH and the last 11 months???(May also said to be the LAST MONTHS) HOw should my select query be like?? This question isn't on-topic for this list; it's about SQL, not PHP.

Re: [PHP] Select Query problem

2003-10-06 Thread irinchiang
n Mon, 6 Oct 2003 14:22:59 +0800, you wrote: Now my question is: What if I would like to display data for the CURRENT MONTH and the last 11 months???(May also said to be the LAST MONTHS) HOw should my select query be like?? On Mon, 06 Oct 2003 07:30:26 +0100, David Otton [EMAIL PROTECTED]

Re: [PHP] Select Query problem

2003-10-06 Thread irinchiang
Now my question is: What if I would like to display data for the CURRENT MONTH and the last 11 months???(May also said to be the LAST MONTHS) HOw should my select query be like?? On Mon, 06 Oct 2003 07:30:26 +0100, David Otton [EMAIL PROTECTED] wrote: This question isn't on-topic for this

RE: [PHP] Select multiple payment mode

2003-10-01 Thread Ralph Guzman
I guess the thing to do would be to log in payments in the database. So lets say the total is $50.00, if the user pays $25 on cc and payment is authorized, then log this into the database, then show the remaining balance. At this point you can give user the option to pay the remaining balance

Re: [PHP] Select form dynamic creation.

2003-09-24 Thread Marek Kilimajer
Have you considered using multiselect? Jeremy Russell wrote: Hello list, I've spent a little time looking to see if this has been done before, and haven't found it, though I'm certain it has been done. What I want to do is build a page by first having a selection form. This select

RE: [PHP] Select form dynamic creation.

2003-09-24 Thread Jeremy Russell
. -Original Message- From: Marek Kilimajer [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 24, 2003 12:35 PM To: Jeremy Russell Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Select form dynamic creation. Have you considered using multiselect? Jeremy Russell wrote: Hello list

Re: [PHP] SELECT MULTIPLE form variable?

2003-06-14 Thread Leif K-Brooks
You need to name it formfield[], not formfield. Noel Wade wrote: Hi all, So I was under the impression that an HTML form SELECT MULTIPLE item would return an array with all of the selected items. This array can then be used with any of the standard PHP array functions, yes? I have 1 HTML page

Re: [PHP] SELECT MULTIPLE form variable?

2003-06-14 Thread Noel Wade
Message - From: Leif K-Brooks [EMAIL PROTECTED] To: Noel Wade [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, June 14, 2003 1:26 PM Subject: Re: [PHP] SELECT MULTIPLE form variable? You need to name it formfield[], not formfield. Noel Wade wrote: Hi all, So I was under

Re: [PHP] Select all that contains in MySql

2003-04-03 Thread Adam Voigt
Try: $query = SELECT * FROM software_assets WHERE $searchType LIKE '$search%' ; Note the percent sign, this is equivalent to a wildcard (* for instance). On Thu, 2003-04-03 at 10:53, Mike Tuller wrote: I have built a search function that searches a table for all items that match what you

Re: [PHP] Select DataBase Mysql Problem

2003-03-23 Thread Tom Rogers
Hi, Sunday, March 23, 2003, 1:26:04 PM, you wrote: MA Hi everyone, MA FIRST THANKX FOR ANY HELP !! MA and THANKX FOR READING :) MA I'm a reall newbie on PHP and i'm build a php app to connect into a mysql MA database.. but i cannot select the database MA i have build the database, and created

Re: [PHP] Select DataBase Mysql Problem

2003-03-23 Thread Miguel Angelo
Thankx a million Tom, I used .mysql_error() and i found it right away. Actualy i have a config.php file with the mysql user information and i was forgeting to do a include(config.php); before i used mysql. Really stupid error. Thankx again. Miguel Angelo Hi, Sunday, March 23, 2003, 1:26:04

Re: [PHP] Select email addresses from MySQL

2003-03-21 Thread olinux
You probably have other fields in the same table that the client can use to select these people. find out exactly what he wants. It may be something like I want to be able to send to a specific state or profession so build a form that allows him to select the approriate filter. You might also

RE: [PHP] Select email addresses from MySQL

2003-03-21 Thread Adrian Portsmouth
Hi Tim, I did something similar recently but I had a bit more info stored than just an e-mail address, so I set-up a search system for the client whereby he could e-mail all of the people in the search result set. Just a thought that might give you some ideas for your situation. HTH Ade

RE: [PHP] Select Field Form Value

2003-02-22 Thread John W. Holmes
Here is my problem. I am using the following two lines to get multiple values from a form field select statement. while (list($key,$val) = each($_POST[Restrictions])) {$Restrictions .= $val,;} trtdRestrictions/tdtd$Restrictions/td/tr The problem is when it fills out the table, it adds

Re: [PHP] select query question

2003-02-17 Thread Rick Emery
SELECT * FROM mytable WHERE flags NOT IN('L','C') rick People will forget what you said. People will forget what you did. But people will never forget how you made them feel. - Original Message - From: Sunfire [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 17, 2003 11:19

Re: [PHP] select unique values from an array

2003-02-01 Thread janet
In a message dated 2/1/2003 9:39:55 AM Pacific Standard Time, [EMAIL PROTECTED] writes: I am attempting to populate form elements from a text file which has been read and split into arrays. Some of the items are repeated many times: grade level, for example. Is there a way of just selecting

RE: [PHP] Select value for driopdown box

2003-01-25 Thread Ben C.
I tried to use the below but it does not work. Please help! -Original Message- From: Michael Sweeney [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 10:29 AM To: Ben C. Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Select value for driopdown box Assuming that you know which

RE: [PHP] SELECT with WHILE NOT

2003-01-25 Thread Sean Malloy
SELECT * FROM rap WHERE rsponsor != '{$_SESSION['sid']}' ORDER by rsname,rfname,rcountry,rcity DESC LIMIT 20 SELECT * FROM rap WHERE rsponsor NOT IN ('{$_SESSION['sid']}') ORDER by rsname,rfname,rcountry,rcity DESC LIMIT 20 -Original Message- From: Andre Dubuc [mailto:[EMAIL

Re: [PHP] SELECT with WHILE NOT

2003-01-25 Thread Andre Dubuc
Hi Sean, Before sending to the list, I had already tried your first suggestion and ended up with only the records that I wanted excluded. Your second suggestion with NOT IN works like a charm. (There wasn't much about 'NOT' in the docs, and I must have missed the 'IN' part.) Thanks for your

Re: [PHP] Select value for driopdown box

2003-01-25 Thread Greg Beaver
10:29 AM To: Ben C. Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Select value for driopdown box Assuming that you know which state is selected before you build the select list: $sel_state = $_REQUEST['state']; ... while($row = mysql_fetch_array($result)) { $buyerid = $row[

Re: [PHP] Select value for driopdown box

2003-01-22 Thread Michael Sweeney
Assuming that you know which state is selected before you build the select list: $sel_state = $_REQUEST['state']; ... while($row = mysql_fetch_array($result)) { $buyerid = $row['buyerid']; $state = $row['state']; $selected = $state == $sel_state ? selected=\selected\ : ;

Re: [PHP] Select value for driopdown box

2003-01-22 Thread Jim Lucas
function DrawOptions($options, $active='') { $str = ''; foreach($options AS $key=$value) { $sel = ($active==$key? SELECTED:); $str .= option value='.$key.'.$sel..$value./option\n; } return($str); } Try this select name='something' ?=DrawOptions($array, $active)? /select array

Re: [PHP] Select multiple boxes

2003-01-21 Thread Chris Hewitt
John W. Holmes wrote: How does php know what suitable form data is? I guess it could look for multiple names in the GET or POST data. But then that would mean for every variable it goes to create, it would have to go and look if it's already created one by that name. If it did, erase the old

RE: [PHP] Select multiple boxes

2003-01-20 Thread Ford, Mike [LSS]
-Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: 18 January 2003 14:41 use [] in your select box name. When it comes back in the $_POST array you will have an array of options. It breaks HTML standard No, it does not break HTML standards -- that is a PHP

Re: [PHP] Select multiple boxes

2003-01-20 Thread Sean Burlington
Ford, Mike [LSS] wrote: -Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: 18 January 2003 14:41 use [] in your select box name. When it comes back in the $_POST array you will have an array of options. It breaks HTML standard No, it does not break HTML standards --

RE: [PHP] Select multiple boxes

2003-01-20 Thread John W. Holmes
use [] in your select box name. When it comes back in the $_POST array you will have an array of options. It breaks HTML standard No, it does not break HTML standards -- that is a PHP urban myth (which, to my chagrin, I helped to propagate before a wiser head sent me to read said

Re: [PHP] Select multiple boxes

2003-01-20 Thread Sean Burlington
John W. Holmes wrote: use [] in your select box name. When it comes back in the $_POST array you will have an array of options. It breaks HTML standard No, it does not break HTML standards -- that is a PHP urban myth (which, to my chagrin, I helped to propagate before a wiser head sent

RE: [PHP] Select multiple boxes

2003-01-18 Thread Cal Evans
use [] in your select box name. When it comes back in the $_POST array you will have an array of options. It breaks HTML standard therefore it is a Bad Thing (tm) but it does work. SELECT name=mySelect[] multi option name='1'Don't pick me/option option name='2'Pick me/option /select Selecting

RE: [PHP] Select multiple boxes

2003-01-18 Thread John W. Holmes
Is there any way to get all of the elements in a SELECT MULTIPLE box, not just the ones that are selected? Thanks! No. You create the box, so you should know all of the possible values. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today.

RE: [PHP] Select multiple boxes

2003-01-18 Thread Cal Evans
To: Gregory Chagnon; [EMAIL PROTECTED] Subject: RE: [PHP] Select multiple boxes use [] in your select box name. When it comes back in the $_POST array you will have an array of options. It breaks HTML standard therefore it is a Bad Thing (tm) but it does work. SELECT name=mySelect[] multi option name

Re: [PHP] Select multiple boxes

2003-01-18 Thread Gregory Chagnon
The problem is I have 2 seelect boxes...it's for creating a user and adding them to a list of available groups...so I have one select box that is initially empty called memberOf and another box that has all of the available groups listed in it called availableGroups. I have a script that can move

RE: [PHP] Select multiple boxes

2003-01-18 Thread John W. Holmes
The problem is I have 2 seelect boxes...it's for creating a user and adding them to a list of available groups...so I have one select box that is initially empty called memberOf and another box that has all of the available groups listed in it called availableGroups. I have a script that

RE: [PHP] Select multiple boxes

2003-01-18 Thread Cal Evans
PROTECTED]] Sent: Saturday, January 18, 2003 9:31 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Select multiple boxes The problem is I have 2 seelect boxes...it's for creating a user and adding them to a list of available groups...so I have one select box that is initially empty called memberOf

RE: [PHP] select * From ????

2002-12-15 Thread Martin Towell
can you post some more of your code? I think, if it's not too big, the entire while loops Martin -Original Message- From: Bruce Levick [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 9:45 AM To: [EMAIL PROTECTED] Subject: [PHP] select * From Hi, Am just a newbie at

RE: [PHP] select * From ????

2002-12-15 Thread Martin Towell
Looks good to me, but as Peter said, see if you really are getting something in ['img'] try print_r($row) or var_dump($row) to make sure -Original Message- From: Bruce Levick [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 10:01 AM To: Martin Towell Subject: RE: [PHP] select

Re: [PHP] Select drop-down box overflow?

2002-12-11 Thread Jason Wong
On Wednesday 11 December 2002 13:17, Doug Parker wrote: I've got sort of an odd one here. I'm populating a select drop down box with a substantial number of options - actually every county in the U.S.- which is about 3000 results from a query. The problem is that when I load the page,

Re: [PHP] SELECT MULTIPLE...

2002-11-11 Thread Jason Wong
On Monday 11 November 2002 17:51, Bsantos PHP wrote: Hello: I'm building an internal messaging system for small biz companies and I can't really go longer Problem is, I use some fields to make the message form and one of them must be a select multiple form element wich refers to

Re: [PHP] SELECT MULTIPLE...

2002-11-11 Thread Bsantos PHP
Sorry People: I really forget that: Line 110: VALUES ('$receptor[1]', '$mfi-email', '$frm[priority]', '$frm[title]', '$frm[description]', now(), '$on_special') which makes part of: if (!isset ($receptor[])) { $receptor[] = {0,0,0,0,0,0}; } else { } for ($i=0;$i6;$i++) { $qid =

RE: [PHP] SELECT MULTIPLE...

2002-11-11 Thread John W. Holmes
Line 110: VALUES ('$receptor[1]', '$mfi-email', '$frm[priority]', '$frm[title]', '$frm[description]', now(), '$on_special') Those errors are just warnings. It's telling you that $receptor[1] does not have a value when it reaches that statement. Does that matter to you? You may want to throw

Re: [PHP] Select values in an array???

2002-10-29 Thread John Nichel
Change the name of your select field to select[] select name=whatever[] multiple Craig wrote: I am trying to pass the values of a select box which can have more than one value to a page. In the address bar of the page i have sent to, I have

Re: [PHP] Select values in an array???

2002-10-29 Thread Rick Emery
You don't even need the word multiple - Original Message - From: John Nichel [EMAIL PROTECTED] To: Craig [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:27 AM Subject: Re: [PHP] Select values in an array??? Change the name of your select field to select

Re: [PHP] Select values in an array???

2002-10-29 Thread John Nichel
, October 29, 2002 9:27 AM Subject: Re: [PHP] Select values in an array??? Change the name of your select field to select[] select name=whatever[] multiple Craig wrote: I am trying to pass the values of a select box which can have more than one value to a page. In the address bar of the page i have

Re: [PHP] Select values in an array???

2002-10-29 Thread Rick Emery
I've used it without multiple many times - Original Message - From: John Nichel [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED] Cc: Craig [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:33 AM Subject: Re: [PHP] Select values in an array??? You do if you want

Re: [PHP] Select values in an array???

2002-10-29 Thread Craig
multiple many times - Original Message - From: John Nichel [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED] Cc: Craig [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:33 AM Subject: Re: [PHP] Select values in an array??? You do if you want to select multiple

Re: [PHP] Select values in an array???

2002-10-29 Thread John Nichel
:05e401c27f60$52399a90$0500a8c0;honeybee... I've used it without multiple many times - Original Message - From: John Nichel [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED] Cc: Craig [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:33 AM Subject: Re: [PHP] Select values

Re: [PHP] Select values in an array???

2002-10-29 Thread @ Edwin
Hello, Rick Emery [EMAIL PROTECTED] wrote: [snip] I've used it without multiple many times [/snip] Of course. But, John was correct--you can only choose one. UNLESS you use multiple, you won't be able to select multiple values ;) What seems to be the problem here... html? :) - E -- PHP

Re: [PHP] Select values in an array???

2002-10-29 Thread John Nichel
: Craig [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:33 AM Subject: Re: [PHP] Select values in an array??? You do if you want to select multiple values from a select element. Otherwise, you can only select one. Rick Emery wrote: You don't even need the word multiple

Re: [PHP] Select values in an array???

2002-10-29 Thread Rick Emery
I HAVE selected multiple items without including MULTIPLE. - Original Message - From: John Nichel [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:54 AM Subject: Re: [PHP] Select values in an array??? Then you were not able

Re: [PHP] Select values in an array???

2002-10-29 Thread Rick Emery
. Yes, this page works... http://www.preferred-pet.com/volunteer/volunteer.php - Original Message - From: John Nichel [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:54 AM Subject: Re: [PHP] Select values in an array??? Then you

RE: [PHP] Select values in an array???

2002-10-29 Thread Ford, Mike [LSS]
-Original Message- From: Rick Emery [mailto:remery;emeryloftus.com] Sent: 29 October 2002 16:15 To: [EMAIL PROTECTED] Subject: Re: [PHP] Select values in an array??? I HAVE selected multiple items without including MULTIPLE. The following link displays a form in which

Re: [PHP] Select values in an array???

2002-10-29 Thread @ Edwin
Hello, Rick Emery [EMAIL PROTECTED] wrote: I HAVE selected multiple items without including MULTIPLE. The following link displays a form in which there are multiple SELECTS with the same name. Upon processing the form on submit, I do retrieve all selected values, not just the last. To check

Re: [PHP] Select values in an array???

2002-10-29 Thread Rick Emery
: Re: [PHP] Select values in an array??? Hello, Rick Emery [EMAIL PROTECTED] wrote: I HAVE selected multiple items without including MULTIPLE. The following link displays a form in which there are multiple SELECTS with the same name. Upon processing the form on submit, I do retrieve all

Re: [PHP] Select values in an array???

2002-10-29 Thread John Nichel
: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 9:54 AM Subject: Re: [PHP] Select values in an array??? Then you were not able to select multiple values. If you don't include the multiple, it will only allow you to select one value. Rick Emery wrote: I've used it without multiple many times

Re: [PHP] Select values in an array???

2002-10-29 Thread John Nichel
cheers rick- Original Message - From: @ Edwin [EMAIL PROTECTED] To: Rick Emery [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 10:25 AM Subject: Re: [PHP] Select values in an array??? Hello, Rick Emery [EMAIL PROTECTED] wrote: I HAVE selected multiple items

Re: [PHP] Select values in an array???

2002-10-29 Thread @ Edwin
PROTECTED] To: Rick Emery [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 10:25 AM Subject: Re: [PHP] Select values in an array??? Hello, Rick Emery [EMAIL PROTECTED] wrote: I HAVE selected multiple items without including MULTIPLE. The following link displays

Re: [PHP] SELECT dropdown from a db query?

2002-09-18 Thread Sascha Cunz
Change SELECT name=rapped to SELECT name=rapped size=1 Sascha Am Donnerstag, 19. September 2002 03:34 schrieb Andre Dubuc: I'm trying to generate a dropdown SELECT list from a database query. So far, all I've managed to create is multiple one-item dropdowns for each database entry spread

Re: [PHP] SELECT dropdown from a db query?

2002-09-18 Thread Jacob Miller
Move select/select outside the do-while loop: print SELECT name=rapped; $row = 0; do { $myrow = pg_fetch_array($result,$row); if ($myrow['rupload'] != ) { print option{$myrow['rfname']} {$myrow['rsname']}/option; } $row++; } while ($row

Re: [PHP] SELECT dropdown from a db query?

2002-09-18 Thread Andre Dubuc
Thanks Jacob and Sascha, I would've struggled with that one for a day before I realized what was wrong. Thanks again -- it works great! Regards (and thanks yet again :) Andre On Wednesday 18 September 2002 09:54 pm, Jacob Miller wrote: Move select/select outside the do-while loop: print

Re: [PHP] select box

2002-09-09 Thread Support @ Fourthrealm.com
If you want to put the SELECTED option into your select list while you are building the page, use an if statement in the option... ... something like this: OPTION VALUE=1 ?php if ($this==$that) {echo SELECTED; } ? Option 1 OPTION VALUE=2 ?php if ($this==$that2) {echo SELECTED; } ? Option 2

Re: [PHP] select distinct mysql

2002-08-16 Thread Analysis Solutions
On Thu, Aug 15, 2002 at 01:12:59PM +0300, kale wrote: SELECT *, DISTINCT name FROM history ORDER date DESC, time DESC LIMIT 10 but this not work. how can I do this? I use a mysql server. That's because your query string syntax is all messed up. Put a mysql_error() call in your script

Re: [PHP] select multiple

2002-07-31 Thread Martin Clifford
It depends on how you want them to be in the database. If you want comma-delimited, then just use implode(). $array = array(Red, Blue, Green); $comma_seperated = implode(, , $array); $space_seperated = implode( , $array); There really is no limit to how you want to do this. Then just use

Re: [PHP] select multiple

2002-07-31 Thread 1LT John W. Holmes
Use implode to make the array into a string and insert that. Depends on your database structure exactly how you'd do it... www.php.net/implode ---John Holmes... - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 31, 2002 8:56 AM Subject: [PHP]

Re: [PHP] select multiple within for-each (SOLVED)

2002-07-15 Thread William S.
Please disregard the previous posting I made. I figured it out. On Mon, Jul 15, 2002 at 10:52:23AM +0200, William S. wrote: This works OK with creating buttons but is not what I want. POST/INPUT xsl:for-each select=. . . xsl:sort/ form

Re: [PHP] Select-List

2002-06-05 Thread Devrim GUNDUZ
Hi, On Wed, 5 Jun 2002, DragosB wrote: How can I check how many options has been selected from a select list? I tried in many ways, but it returns the last option selected. Let's say your select box code is similar to this: SELECT name=day[] size=7 multiple ...

RE: [PHP] select statement

2002-05-16 Thread John Holmes
Nothing to do with PHP... SELECT * FROM myTable WHERE ID IN (1,3,7,9); If you're using MySQL, read the manual: http://www.mysql.com/documentation/mysql/bychapter/ ---John Holmes... -Original Message- From: Wilbert Enserink [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 16, 2002

Re: [PHP] select statement

2002-05-16 Thread Jason Wong
On Thursday 16 May 2002 19:19, Wilbert Enserink wrote: Hi all, I want to select some records with e.g. ID's 1,3,7 and 8 How can this be done best? is it: SELECT * FROM myTable WHERE ID=1,3,7,8 ?? Is this a PHP question? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open

Re: [PHP] SELECT + PARSE ERROR

2002-04-08 Thread Chris Kwasneski
At 02:23 PM 4/8/2002 +0200, you wrote: Hy, I try to do a SELECT but when I test my code I Have a parse error. If someone can explain to me why. Code: $db = mysql_connect(newsmanga_db); $req = SELECT * FROM dvds WHERE nomdvd='.$nom..$i' ; /// PARSE ERROR IN THIS LINE Your missing a '.' after

Re: [PHP] SELECT + PARSE ERROR

2002-04-08 Thread RIVES Sergio
Hi the error appears because of the comas erroned syntaxis. why don't u try something easire as that : $varalacon = $nom..$i; (i don't know if there is a space or not...in bold) $req = SELECT * FROM dvds WHERE nomdvd='$varalacon' ; Hope it helps SR Jérome Moisy a écrit : Hy, I try to do a

Re: [PHP] SELECT + PARSE ERROR

2002-04-08 Thread Nick Winfield
On Mon, 8 Apr 2002, [iso-8859-1] Jérome Moisy wrote: Hy, I try to do a SELECT but when I test my code I Have a parse error. If someone can explain to me why. Code: $db = mysql_connect(newsmanga_db); $req = SELECT * FROM dvds WHERE nomdvd='.$nom..$i' ; /// PARSE ERROR IN THIS LINE

Re: [PHP] SELECT + PARSE ERROR

2002-04-08 Thread heinisch
At 08.04.2002 14:23, you wrote: Hy, I try to do a SELECT but when I test my code I Have a parse error. If someone can explain to me why. Code: $db = mysql_connect(newsmanga_db); $req = SELECT * FROM dvds WHERE nomdvd='.$nom..$i' ; /// PARSE ERROR IN THIS LINE Try this : $req = SELECT * FROM

Re: [PHP] SELECT + PARSE ERROR

2002-04-08 Thread Jérome Moisy
Thanks at All -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Select then update

2002-03-23 Thread Alberto Wagner
You need to put {} in the while function like this while { do this } $query = SELECT name FROM users; $ret = mysql_query($query); while(list($name) = mysql_fetch_row($ret)) or die(Error: .mysql_error()) { print (your name is $name); $query_update[name] = (UPDATE my_other_table set name =

Re: [PHP] SELECT DAYOFYEAR(NOW())

2002-01-13 Thread Rasmus Lerdorf
This doesn't appear to be a PHP question. Are you sure you are on the right list? On Sun, 13 Jan 2002, sundogcurt wrote: Hi! I'm storing a date in this format : 2002-01-13 11:08:40 -mm-dd hh:mm:ss This is great because it gives me the date and the time, which I need. I want to

<    1   2   3   >