Re: Post form variables to a frame
| From: | Burhan Khalid | Date: | Sun, 26 Oct 2003 10:49:27 +0000 |
| Subject: | Re: Post form variables to a frame | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167618@lists.php.net to get a copy of this message | ||
Luis Lebron wrote:
Here is the frameset:
<frameset rows="80,*,30" cols="*" frameborder="NO" border="0"
framespacing="0">
<frame src="header.php" name="topFrame" scrolling="NO" noresize >
<frameset rows="*" cols="250,*" framespacing="0" frameborder="NO"
border="0">
<frame src="browse.php" name="leftFrame" scrolling="AUTO" noresize>
<frame src="info.php" name="mainFrame">
</frameset>
<frame src="footer.php" name="bottonFrame" scrolling="NO" noresize >
</frameset>
and here is the form:
<form action="frame.php" method="POST" target="leftFrame">
<select name="category">
<option value="1" label="1">1</option>
<option value="2" label="2">2</option>
<option value="3" label="3">3</option>
<option value="4" label="4">4</option>
</select>
<input type="submit" />
and here is the relevant lines of browse.php
$category=$_POST["category"];
$query="Select username, age, height, eyeColor, haircolor, build, id from
users where category='$category'";
Well your form is sending its data to frame.php -- but you are looking for it in browse.php
if you change name="category" to name="category[]" then you'll get your results in an array with $category[0] holding the value of the selected index.
--
Burhan Khalid
phplist[at]meidomus[dot]com
http://www.meidomus.com