Please be gentle as this is my first time with a php website.
What i am trying to acheive is this:
The site has many pages where someone can advertise thier skills, in essence they can subscribe to a page. Simple right?
Now on the page where they can select which pages they want to subscribe too, they choose a county from a drop down menu ( this is working ) then it displays all the pages connected to that county (mostly working apart from the first one doesnt display)
If the page is still available a check box should appear next to the town name and postcode, only at the moment a check box appears on all the towns. I have set the pagestate in the database to either A (available) or B (taken).
Eventually when i get it working, the user should be able to check all the towns he/she wants to take and then move onto the next page with their selected places.
The code i have hashed together so far have so far is this: (dont laugh to much)
P.s the prices are just an example at the moment as i havent worked that out yet!
Code: Select all
<form action"code2.php" method="post">
<?php
if ($row['pagestate'] == "A") {$checkbox = "<input type='checkbox' value='0' name='add'></div>";} elseif ($row['pagestate'] == "B") {$checkbox = "Sorry this page is already taken</div>";}
if ($row['priceb'] = "A") {$price = "£10.00";} elseif ($row['priceb'] = "B") {$price="£20.00";} elseif ($row['priceb'] ="C") {$price="£30.00";} else {$price="£40.00";}
while($row = @mysql_fetch_array($result))
{
echo "<div class='redisplay'>" . $row['postcodename'] . ", ". $row['town'] . ", ". $row['county'] . ", ". $row['country'] . " $price, $checkbox";
echo "<br />";
}
mysql_close($con);
?>
<input type="submit" value="Continue">