Re: [PHP] can't output sql query with php code.

2006-02-06 Thread Jay Paulson
It always helps to have a different point of view to look at code sometimes. Else you'll go bonkers looking for that stupid semi-colon! :) On 2/6/06 2:18 AM, "Paul Goepfert" <[EMAIL PROTECTED]> wrote: > Thanks everyone for your help. I should have seen the semi-colon at > the end of the while

Re: [PHP] can't output sql query with php code.

2006-02-06 Thread Paul Goepfert
Thanks everyone for your help. I should have seen the semi-colon at the end of the while loop. I must have looked at the code 20 times and I can't believe I missed it. Paul On 2/6/06, Brady Mitchell <[EMAIL PROTECTED]> wrote: > > > echo '\n'; > > $month_query = mysql_query("SELE

RE: [PHP] can't output sql query with php code.

2006-02-06 Thread Brady Mitchell
> echo '\n'; > $month_query = mysql_query("SELECT m_id, months FROM Month"); > while ($r = mysql_fetch_array($month_query)); Remove the semi-colon at the end of the above line and it works like a charm. > { > $v = $r["m_id"]; > $

Re: [PHP] can't output sql query with php code.

2006-02-06 Thread Sumeet
Paul Goepfert wrote: This is the full code for the code that doesn't work. \n'; $month_query = mysql_query("SELECT m_id, months FROM Month"); while ($r = mysql_fetch_array($month_query)); { $v = $r["m_id"]; $out = $r["months"];

Re: [PHP] can't output sql query with php code.

2006-02-05 Thread Paul Goepfert
This is the full code for the code that doesn't work. \n'; $month_query = mysql_query("SELECT m_id, months FROM Month"); while ($r = mysql_fetch_array($month_query)); { $v = $r["m_id"]; $out = $r["months"]; echo "$out\n";

RE: [PHP] can't output sql query with php code.

2006-02-05 Thread Brady Mitchell
> Doesn't work > - > $month_query = mysql_query("SELECT m_id, months FROM Month"); > while ($row = mysql_fetch_array($month_query)) > { > $val = $row["m_id"]; > $out = $row["months"]; > echo "$out"; > } > ?> You're missing the tags.

Re: [PHP] can't output sql query with php code.

2006-02-05 Thread Chris
Hi Paul, If "equip" contains a space it will probably break the dropdown. Change it to: echo "$val\n"; in case it has quotes, spaces, < or > in it. Paul Goepfert wrote: Hi all, I have a mysql database setup to use with my php web page. I have been able to access the database and get values