The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using GET to display five specific entries on my website
Here's my next project, and I'm looking for input on how to do it:

I've created a form, and would like to do display five of the form entries on an html page.

My idea is that I will create a php page that will pull the specific fields from five entries, and format the fields with CSS/HTML, to display them the way I want.

I would like a user to be able to log in and select which entries display, and which do not... maybe with a checkbox.

So I would imagine I would need to write a page that would pretty much say 'if that checkbox is checked, then show on this page.. in this format'. That php page would then be used as php-include on the main page of our website.

Is that even possible?

If so, does anyone have some example code I could use that at least displays form fields on a php page? I looked at the tutorial but couldn't get it to work.

So here is what I have figured out so far. I set up the form with formtools. I created an additional field that is a checkbox. The checkbox is not on the form, just editable from the backend when editing the results in formtools.

I then created a php page with the following attached code. Basically it says that if a certain field is equal to "1" (the checkbox), then show the data. (In other words, when the checkbox is checked, the data appears on the below page) The problem is, I'd like it to display each set of data in a different html table.. not as another row in the table.

Any ideas?

PHP Code:

mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM ft_form_12 WHERE col_24='1'";
// $query="SELECT * FROM ft_form_12";
// SELECT * FROM ft_form_12 WHERE col_24='1'


<table border="0" cellspacing="2" cellpadding="2">
<th><font face="Arial, Helvetica, sans-serif">Value1</font></th>
<th><font face="Arial, Helvetica, sans-serif">Value2</font></th>
<th><font face="Arial, Helvetica, sans-serif">Value3</font></th>
<th><font face="Arial, Helvetica, sans-serif">Value4</font></th>
<th><font face="Arial, Helvetica, sans-serif">Value5</font></th>

while (
$i $num) {


<td><font face="Arial, Helvetica, sans-serif"><?php echo $f1?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f2?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f3?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f4?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f5?></font></td>


Forum Jump:

Users browsing this thread: 1 Guest(s)