RE: Looking for help with forms/variables and an array!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wow,
Thank you!

You appear to have gotten me 90% towards my mission final.

mysql_select_db($database_ftn, $ftn);
@extract($_POST);
$query_Recordset1 = "SELECT * FROM lstng_tbl WHERE price_range =
'$select1'";
echo $query_Recordset1;
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1,
$startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $ftn) or
die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);



<form id="form1" name="form1" method="post" action="index_dev.php">
        <label>market
           <select name="select1">
			   <OPTION value="1">Indiana</OPTION>
			   <OPTION value="2">Wisconsin</OPTION>
			   <OPTION value="3">Illinois</OPTION>
			   <OPTION value="4">Michigan</OPTION>
			   <OPTION value="5">Georgia</OPTION>
			   <OPTION value="6">Florida</OPTION>
			   </select>
			   <input name="submit" type="submit" value="post"/>
        </label>
   </form>


Works!!!!!!!!!!!!!

Thank you!
Thank you!
Thank you!

Sincerely,
Brad



-----Original Message-----
From: Jim Lucas [mailto:lists@xxxxxxxxx] 
Sent: Tuesday, June 12, 2007 1:57 PM
To: BSumrall
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Looking for help with forms/variables and an array!

BSumrall wrote:
> It doesn't like the curly brackets either!
> 
> Brad
> 

if this is within PHP, the '{' and '}' are within double quotes (which they
seem to be),

These examples should all do the same thing.

$query_Recordset1 = "SELECT * FROM lstng_tbl WHERE price_range =
'$select1'";
$query_Recordset1 = "SELECT * FROM lstng_tbl WHERE price_range =
'{$select1}'";
$query_Recordset1 = "SELECT * FROM lstng_tbl WHERE price_range =
'".$select1."'";

echo $query_Recordset1;

place an echo just after including the variable and see if you see the
brackets in the statement.


-- 
Jim Lucas

    "Some men are born to greatness, some achieve greatness,
        and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
     by William Shakespeare

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux