Re: [PHP] POST + QUERY

2007-03-28 Thread Dan Shirah
using mssql_fetch_assoc worked out great. I had actually typed it in before but the code formatting didn't change the color of the text like it normally does for my mssql functions so I assumed it wasn't valid and deleted it. Thanks to everyone for your help! On 3/27/07, Jim Lucas <[EMAIL PROT

Re: [PHP] POST + QUERY

2007-03-27 Thread Jim Lucas
Dan Shirah wrote: Okay, I thought this was VERY simple, but I cannot wrap my mind around what I am doing wrong. echo $_POST['max_id']; *The echo returns the correct result *if($_POST['max_id'] ='') { *This is suppose to run the below query if $_POST['max_id'] is not blank* $max_id = $_POST['

Re: [PHP] POST + QUERY

2007-03-27 Thread Zoltán Németh
2007. 03. 27, kedd keltezéssel 17.28-kor Dan Shirah ezt írta: > Here are the results of my print_r > > Array ( [0] => 121 [1] => Y [2] => DS [3] => [4] => {03} > [5] => 500 [6] => *** *[7] => John* [8] => Mark [9] => Doe [10] => 123 My > Way [11] => 456 Your Place [12] => Smithvil

Re: [PHP] POST + QUERY

2007-03-27 Thread Davi
I would try an echo $my_info[7]; []s Em Terça 27 Março 2007 18:28, Dan Shirah escreveu: > Here are the results of my print_r > > Array ( [0] => 121 [1] => Y [2] => DS [3] => [4] => {03} > [5] => 500 [6] => *** *[7] => John* [8] => Mark [9] => Doe [10] => 123 My > Way [11] => 45

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Dan Shirah wrote: Here are the results of my print_r Array ( [0] => 121 [1] => Y [2] => DS [3] => [4] => {03} [5] => 500 [6] => *** *[7] => John* [8] => Mark [9] => Doe [10] => 123 My Way [11] => 456 Your Place [12] => Smithville [13] => 12345 [14] => 5432 [15] => 123555

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
Here is the result from the Once again, bold and red is the first_name field. array(28) { [0]=> int(122) [1]=> string(1) "Y" [2]=> string(2) "DS" [3]=> string(16) "" [4]=> string(4) "{03}" [5]=> float(500) [6]=> string(4) "*** " *[7]=> string(4) "John"* [8]=>

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
Here are the results of my print_r Array ( [0] => 121 [1] => Y [2] => DS [3] => [4] => {03} [5] => 500 [6] => *** *[7] => John* [8] => Mark [9] => Doe [10] => 123 My Way [11] => 456 Your Place [12] => Smithville [13] => 12345 [14] => 5432 [15] => 123555 [16] => 1235550011 [17

Re: [PHP] POST + QUERY

2007-03-27 Thread Zoltán Németh
2007. 03. 27, kedd keltezéssel 17.17-kor Dan Shirah ezt írta: > echo $row_info['first_name']; returns nothing. > > However I have verified the correct spelling both in the database and > in the PHP code and they are identical and when I print_r it shows > that there is a value in the first_name

Re: [PHP] POST + QUERY

2007-03-27 Thread Davi
Have you tried use number instead name? Something like: echo $row_info[0]; On mysql, you've mysql_fetch_object... Does has anything like this on MS Sql Server? best regards... Em Terça 27 Março 2007 18:17, Dan Shirah escreveu: > echo $row_info['first_name']; returns nothing. > > However I ha

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Send us the output of print_r($row_info) feel free to mask out any data values you may wish. Dan Shirah wrote: echo $row_info['first_name']; returns nothing. However I have verified the correct spelling both in the database and in the PHP code and they are identical and when I print_r it shows

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
echo $row_info['first_name']; returns nothing. However I have verified the correct spelling both in the database and in the PHP code and they are identical and when I print_r it shows that there is a value in the first_name column of the record. On 3/27/07, Zoltán Németh <[EMAIL PROTECTED]> wro

Re: [PHP] POST + QUERY

2007-03-27 Thread Zoltán Németh
2007. 03. 27, kedd keltezéssel 16.56-kor Dan Shirah ezt írta: > Sorry, had a typo. > > *$cc_first = $row_info['first_name']; > echo "$cc_first";* > this echo returns nothing. and what does echo $row_info['first_name']; print out? if still nothing, then probably 1) you misspelled the field name

Re: [PHP] POST + QUERY

2007-03-27 Thread Zoltán Németh
2007. 03. 27, kedd keltezéssel 16.56-kor Dan Shirah ezt írta: > print_r($row_info) display the entire column contents of the select id > > However, > > *$first = $row_info['first_name']; > echo "$cc_first";* > > the above echo still returns nothing. yeah because you assign that value to $first,

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
Sorry, had a typo. *$cc_first = $row_info['first_name']; echo "$cc_first";* this echo returns nothing. On 3/27/07, Dan Shirah <[EMAIL PROTECTED]> wrote: print_r($row_info) display the entire column contents of the select id However, *$first = $row_info['first_name']; echo "$cc_first";* the

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
print_r($row_info) display the entire column contents of the select id However, *$first = $row_info['first_name']; echo "$cc_first";* the above echo still returns nothing. On 3/27/07, Davi <[EMAIL PROTECTED]> wrote: Em Terça 27 Março 2007 17:40, Dan Shirah escreveu: > I have echoed somethin

Re: [PHP] POST + QUERY

2007-03-27 Thread Davi
Em Terça 27 Março 2007 17:40, Dan Shirah escreveu: > I have echoed something out after virtually every line of code :) > > When I echo out my result ($result_info) it returns Resource id#2 > When I echo out my row ($row_info) it returns Array > > When I try to echo out a field from my array($my_inf

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Echo $info where you hold you query, to make sure that is reasonable. $result_info is the result set. $row_info ...well you can use var_dump() on this to get its contents... but if row_info prints out nothing, then there is probably a problem with the query, or your query is returning nothing..

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
I have echoed something out after virtually every line of code :) When I echo out my result ($result_info) it returns Resource id#2 When I echo out my row ($row_info) it returns Array When I try to echo out a field from my array($my_info) it returns nothing at all. On 3/27/07, Brad Bonkoski <[

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Dan Shirah wrote: Should I use something besides mssql_fetch_row to get my result? No matter which method I use for determining if the value exists, I still get no data populated to my form. Why not echo out your query before executing it, so you can run it against the back end if you have it

Re: [PHP] POST + QUERY

2007-03-27 Thread Zoltán Németh
2007. 03. 27, kedd keltezéssel 15.58-kor Dan Shirah ezt írta: > Okay, I thought this was VERY simple, but I cannot wrap my mind around what > I am doing wrong. > > > echo $_POST['max_id']; *The echo returns the correct result > *if($_POST['max_id'] ='') { *This is suppose to run the below query

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
Should I use something besides mssql_fetch_row to get my result? No matter which method I use for determining if the value exists, I still get no data populated to my form. On 3/27/07, Tijnema ! <[EMAIL PROTECTED]> wrote: On 3/27/07, Davi <[EMAIL PROTECTED]> wrote: > Em Terça 27 Março 2007 17:

Re: [PHP] POST + QUERY

2007-03-27 Thread Tijnema !
On 3/27/07, Davi <[EMAIL PROTECTED]> wrote: Em Terça 27 Março 2007 17:02, Dave Goodchild escreveu: > use: $_POST['max_id'] == > > or even better: > > if (empty($_POST['max_id'])) Why not: if (!(isset($_POST["max_id"))) ? If form is left empty, it is set, but it's stil empty. So if you submit

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Davi wrote: Em Terça 27 Março 2007 17:02, Dave Goodchild escreveu: use: $_POST['max_id'] == or even better: if (empty($_POST['max_id'])) Why not: if (!(isset($_POST["max_id"))) ? I think the poster *needs* the value to be set to something... so if (isset(...)) {} would work or

Re: [PHP] POST + QUERY

2007-03-27 Thread Dave Goodchild
Because isset will return true if the variable is set, even if it is blank. Empty will return true is the variable holds an empty string.

Re: [PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
So I was dancing all around it by trying !== and = but did not try != /??? UGH! On 3/27/07, Tijnema ! <[EMAIL PROTECTED]> wrote: On 3/27/07, Dan Shirah <[EMAIL PROTECTED]> wrote: > Okay, I thought this was VERY simple, but I cannot wrap my mind around what > I am doing wrong. > > > ec

Re: [PHP] POST + QUERY

2007-03-27 Thread Davi
Em Terça 27 Março 2007 17:02, Dave Goodchild escreveu: > use: $_POST['max_id'] == > > or even better: > > if (empty($_POST['max_id'])) Why not: if (!(isset($_POST["max_id"))) ? -- Davi Vidal [EMAIL PROTECTED] [EMAIL PROTECTED] -- Agora com fortune: "Around computers it is difficult to find th

Re: [PHP] POST + QUERY

2007-03-27 Thread Brad Bonkoski
Dan Shirah wrote: Okay, I thought this was VERY simple, but I cannot wrap my mind around what I am doing wrong. echo $_POST['max_id']; *The echo returns the correct result *if($_POST['max_id'] ='') { *This is suppose to run the below query if $_POST['max_id'] is not blank* $max_id = $_POST[

Re: [PHP] POST + QUERY

2007-03-27 Thread Tijnema !
On 3/27/07, Dan Shirah <[EMAIL PROTECTED]> wrote: Okay, I thought this was VERY simple, but I cannot wrap my mind around what I am doing wrong. echo $_POST['max_id']; *The echo returns the correct result *if($_POST['max_id'] ='') { *This is suppose to run the below query if $_POST['max_id'] i

Re: [PHP] POST + QUERY

2007-03-27 Thread Davi
Em Terça 27 Março 2007 16:58, Dan Shirah escreveu: > Okay, I thought this was VERY simple, but I cannot wrap my mind around what > I am doing wrong. > > > echo $_POST['max_id']; *The echo returns the correct result > *if($_POST['max_id'] ='') { *This is suppose to run the below query if > $_POST[

Re: [PHP] POST + QUERY

2007-03-27 Thread Dave Goodchild
use: $_POST['max_id'] == or even better: if (empty($_POST['max_id']))

[PHP] POST + QUERY

2007-03-27 Thread Dan Shirah
Okay, I thought this was VERY simple, but I cannot wrap my mind around what I am doing wrong. echo $_POST['max_id']; *The echo returns the correct result *if($_POST['max_id'] ='') { *This is suppose to run the below query if $_POST['max_id'] is not blank* $max_id = $_POST['max_id']; *Sets my