ec Posted March 29, 2008 Share Posted March 29, 2008 is it possible with PHP to query for a set of results and then put these results in bullet form allowing the user to select one of the results for storage?? Quote Link to comment https://forums.phpfreaks.com/topic/98522-is-this-possible/ Share on other sites More sharing options...
dezkit Posted March 29, 2008 Share Posted March 29, 2008 yes Quote Link to comment https://forums.phpfreaks.com/topic/98522-is-this-possible/#findComment-504199 Share on other sites More sharing options...
pocobueno1388 Posted March 29, 2008 Share Posted March 29, 2008 I'm sure it's possible, I'm just not exactly sure exactly what you mean when you say "bullet form". Quote Link to comment https://forums.phpfreaks.com/topic/98522-is-this-possible/#findComment-504200 Share on other sites More sharing options...
ec Posted March 29, 2008 Author Share Posted March 29, 2008 oh sorry... I mean having like a button next to in so that you can click it to submit it as the contents of a field...any ideas how you might go about it?? because everything just goes weird for me when combining html with php Quote Link to comment https://forums.phpfreaks.com/topic/98522-is-this-possible/#findComment-504217 Share on other sites More sharing options...
pocobueno1388 Posted March 29, 2008 Share Posted March 29, 2008 It should look something like this: <?php if (isset($_POST['submit'])){ $choice = $_POST['choice']; echo "The user selected <b>$choice</b><p>"; } $query = mysql_query("SELECT * FROM TABLE"); echo '<form>'; while ($row = mysql_fetch_assoc($query)){ echo "<input type='radio' name='choice' value='{$row['unique_col']}'><br>"; } echo '<input type="submit" name="submit">'; echo '</form>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/98522-is-this-possible/#findComment-504221 Share on other sites More sharing options...
uniflare Posted March 29, 2008 Share Posted March 29, 2008 php is almost useless without html , using the two in unison is key to professional website design (and CSS) Quote Link to comment https://forums.phpfreaks.com/topic/98522-is-this-possible/#findComment-504258 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.